469,336 Members | 5,494 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,336 developers. It's quick & easy.

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 13538
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by dale zhang | last post: by
27 posts views Thread by pamela fluente | last post: by
7 posts views Thread by =?Utf-8?B?aXdlYg==?= | last post: by
3 posts views Thread by Brian Cryer | last post: by
22 posts views Thread by Kurien Mathew | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.