473,376 Members | 1,035 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,376 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 14035
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.