473,387 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

VBA equivalent for Page Break?

I know I can user vbcrlf to generate a linefeed when exporting text.
Is there a way to force page breaks in the exported text using VBA?

Apr 5 '07 #1
8 14037
On Apr 5, 8:31 am, "Lauren Quantrell" <laurenquantr...@hotmail.com>
wrote:
I know I can user vbcrlf to generate a linefeed when exporting text.
Is there a way to force page breaks in the exported text using VBA?

I think page breaks are specific to the program that is viewing the
file or generating the hard copy.
There is a page break control you can use in printing forms and
reports, but I don't know that there is a 'universal' control
character.

Apr 5 '07 #2
"storrboy" <st******@sympatico.cawrote in news:1175778155.483404.113820
@d57g2000hsg.googlegroups.com:
On Apr 5, 8:31 am, "Lauren Quantrell" <laurenquantr...@hotmail.com>
wrote:
>I know I can user vbcrlf to generate a linefeed when exporting text.
Is there a way to force page breaks in the exported text using VBA?


I think page breaks are specific to the program that is viewing the
file or generating the hard copy.
There is a page break control you can use in printing forms and
reports, but I don't know that there is a 'universal' control
character.
MS claims that vbNewline is somewhat universal. They also claim that their
programs actually work. So it's a maybe ....

--
lyle fairfield

Ceterum censeo Redmond esse delendam
Apr 5 '07 #3
On Apr 5, 10:38 am, lyle fairfield <lylef...@yahoo.cawrote:
"storrboy" <storr...@sympatico.cawrote in news:1175778155.483404.113820
@d57g2000hsg.googlegroups.com:
On Apr 5, 8:31 am, "Lauren Quantrell" <laurenquantr...@hotmail.com>
wrote:
I know I can user vbcrlf to generate a linefeed when exporting text.
Is there a way to force page breaks in the exported text using VBA?
I think page breaks are specific to the program that is viewing the
file or generating the hard copy.
There is a page break control you can use in printing forms and
reports, but I don't know that there is a 'universal' control
character.

MS claims that vbNewline is somewhat universal. They also claim that their
programs actually work. So it's a maybe ....

--
lyle fairfield

Ceterum censeo Redmond esse delendam

I thought that just added a blank line between others. I didn't take
it as a page break. Have to try it sometime.

Apr 5 '07 #4
"storrboy" <st******@sympatico.cawrote in
news:11**********************@e65g2000hsc.googlegr oups.com:
On Apr 5, 10:38 am, lyle fairfield <lylef...@yahoo.cawrote:
>"storrboy" <storr...@sympatico.cawrote in
news:1175778155.483404.113820 @d57g2000hsg.googlegroups.com:
On Apr 5, 8:31 am, "Lauren Quantrell" <laurenquantr...@hotmail.com>
wrote:
I know I can user vbcrlf to generate a linefeed when exporting
text. Is there a way to force page breaks in the exported text
using VBA?
I think page breaks are specific to the program that is viewing the
file or generating the hard copy.
There is a page break control you can use in printing forms and
reports, but I don't know that there is a 'universal' control
character.

MS claims that vbNewline is somewhat universal. They also claim that
their programs actually work. So it's a maybe ....

--
lyle fairfield

Ceterum censeo Redmond esse delendam


I thought that just added a blank line between others. I didn't take
it as a page break. Have to try it sometime.
You're right. My bad ... should read the posts before I answer them!
--
lyle fairfield

Ceterum censeo Redmond esse delendam
Apr 5 '07 #5
On Apr 5, 9:02 am, "storrboy" <storr...@sympatico.cawrote:
On Apr 5, 8:31 am, "Lauren Quantrell" <laurenquantr...@hotmail.com>
wrote:
I know I can user vbcrlf to generate a linefeed when exporting text.
Is there a way to force page breaks in the exported text using VBA?

I think page breaks are specific to the program that is viewing the
file or generating the hard copy.
There is a page break control you can use in printing forms and
reports, but I don't know that there is a 'universal' control
character.
In may not be universal any more, but back in the good old days of
line printers the page break character was Chr(12). That is the ASCII
"Form Feed (FF)" character, and the VBA constant is vbFormFeed.

Apr 6 '07 #6
In may not be universal any more, but back in the good old days of
line printers the page break character was Chr(12). That is the ASCII
"Form Feed (FF)" character, and the VBA constant is vbFormFeed.

I've never bothered looking at that one mostly because of statements
like this from the 2002 (and I pretty sure the earlier ones also) help
file topic called Miscellaneous Constants ....

"vbFormFeed Chr(12) Not useful in Microsoft Windows or on the
Macintosh"

Apr 7 '07 #7
Thanks,
vbFormFeed does the trick, at least for MS Word.
lq
On Apr 7, 7:31 pm, "storrboy" <storr...@sympatico.cawrote:
In may not be universal any more, but back in the good old days of
line printers the page break character was Chr(12). That is the ASCII
"Form Feed (FF)" character, and the VBA constant is vbFormFeed.

I've never bothered looking at that one mostly because of statements
like this from the 2002 (and I pretty sure the earlier ones also) help
file topic called Miscellaneous Constants ....

"vbFormFeed Chr(12) Not useful in Microsoft Windows or on the
Macintosh"

Apr 8 '07 #8
On Apr 8, 9:39 am, "Lauren Quantrell" <laurenquantr...@hotmail.com>
wrote:
Thanks,
vbFormFeed does the trick, at least for MS Word.
lq

On Apr 7, 7:31 pm, "storrboy" <storr...@sympatico.cawrote:
In may not be universal any more, but back in the good old days of
line printers the page break character was Chr(12). That is the ASCII
"Form Feed (FF)" character, and the VBA constant is vbFormFeed.
I've never bothered looking at that one mostly because of statements
like this from the 2002 (and I pretty sure the earlier ones also) help
file topic called Miscellaneous Constants ....
"vbFormFeed Chr(12) Not useful in Microsoft Windows or on the
Macintosh"

Interesting how something branded as "not useful" actually works.

Apr 8 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: Weston C | last post by:
I know of course that you can use <script src=""></script> in an HTML document to include javascript code you don't want to spill all over the page. I'm wondering if there's a way to include...
4
by: Hai Nguyen | last post by:
I'm learning C sharp and do not like vb much. I'm creatiing a wepage using panel to test myself. I tried to use these code below, which is written in VB, and to transform them to c sharp but I got...
14
by: dale zhang | last post by:
Hi groups, Can anyone give me the equivalent C# sharp code for this VB.ET code, :: VB.NET :: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles...
3
by: Barbara Alderton | last post by:
I recently wrote an ASP.NET app that used user controls. I produced a printer-friendly output form. One requirement was a pagebreak between one part of the form and another. I had no problem...
27
by: pamela fluente | last post by:
Hello, for the following code, VS suggests that construct (width= height= ) is out of date and a newer one is recommended: <table><tr><td width="92" height="38" valign="middle">AnyThing</td></...
7
by: =?Utf-8?B?aXdlYg==?= | last post by:
Can we set page breaks in ASP Pages dynamically based on the data being populated? Akshay.
3
by: Brian Cryer | last post by:
It would be very handy to be able to stop the debugger on parts of code without having to explicitly set a breakpoint - either a "debugger.break" or "debug.assert" type of thing would do. I've not...
0
DTV12345
by: DTV12345 | last post by:
Greetings! This is an excerpt from the Oracle documentation:"...ORACLE SQL*Plus BREAK command creates a subset of records and add space and/or summary lines after each subset. The column you...
22
by: Kurien Mathew | last post by:
Hello, Any suggestions on a good python equivalent for the following C code: while (loopCondition) { if (condition1) goto next; if (condition2) goto next;
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.