ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Printing -- Page Number Continuity (https://www.excelbanter.com/excel-programming/341367-printing-page-number-continuity.html)

[email protected]

Printing -- Page Number Continuity
 
If I develop three blocks of print programming in VBA whe

1st Block Prints 4 pages
2nd Block Prints 3 more pages
3rd Block Prints 7 more pages

then, is it possible for the page numbers for the three different sets
of print commands to be sequential (1 thru 14)?

Currently, my first print block produces four pages,numbered 1 thru 4.
My second print block produces three pages, numbered 1 thru 3. And my
third print block produces seven pages, numbered 1 thru 7.

Ideally, I'd like the first print block to produce four pages numbered
1 thru 4, the second print block to produce three pages numbered 5 thru
7, and the third print block to produce seven pages numbered 8 thru 14.


Might anyone have any ideas? Thanks.

Michael


Ron de Bruin

Printing -- Page Number Continuity
 
Try it like this

The space is importent after the 4 (bug)

Sub test()
With ActiveSheet.PageSetup
Range("a1:G204").PrintPreview
.LeftHeader = "&P+4 "
Range("a400:G500").PrintPreview
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


wrote in message oups.com...
If I develop three blocks of print programming in VBA whe

1st Block Prints 4 pages
2nd Block Prints 3 more pages
3rd Block Prints 7 more pages

then, is it possible for the page numbers for the three different sets
of print commands to be sequential (1 thru 14)?

Currently, my first print block produces four pages,numbered 1 thru 4.
My second print block produces three pages, numbered 1 thru 3. And my
third print block produces seven pages, numbered 1 thru 7.

Ideally, I'd like the first print block to produce four pages numbered
1 thru 4, the second print block to produce three pages numbered 5 thru
7, and the third print block to produce seven pages numbered 8 thru 14.


Might anyone have any ideas? Thanks.

Michael




Ron de Bruin

Printing -- Page Number Continuity
 
That stupid English <vbg

importent important


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ron de Bruin" wrote in message ...
Try it like this

The space is importent after the 4 (bug)

Sub test()
With ActiveSheet.PageSetup
Range("a1:G204").PrintPreview
.LeftHeader = "&P+4 "
Range("a400:G500").PrintPreview
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


wrote in message oups.com...
If I develop three blocks of print programming in VBA whe

1st Block Prints 4 pages
2nd Block Prints 3 more pages
3rd Block Prints 7 more pages

then, is it possible for the page numbers for the three different sets
of print commands to be sequential (1 thru 14)?

Currently, my first print block produces four pages,numbered 1 thru 4.
My second print block produces three pages, numbered 1 thru 3. And my
third print block produces seven pages, numbered 1 thru 7.

Ideally, I'd like the first print block to produce four pages numbered
1 thru 4, the second print block to produce three pages numbered 5 thru
7, and the third print block to produce seven pages numbered 8 thru 14.


Might anyone have any ideas? Thanks.

Michael






[email protected]

Printing -- Page Number Continuity
 
Thanks Ron. I failed to mention an important part of my problem. The
number of pages in each print block is dynamic, rather than static.
That is, I don't know for sure the number of pages that each print
block will produce. I used 4 pages, 3 pages, and 7 pages to illustrate
my need. In fact, I won't know whether the first print block will
produce 4 pages or 6 pages. Assuming that x number of pages are printed
from the first print block, I'd like the numbering for the second block
of print pages to begin at x+1. And if the second print block produces
y additional pages, then I'd like the numbering for the third block to
begin at x+y+1.

I'm sorry for leaving out the most important part of my dilemma.


Ron de Bruin

Printing -- Page Number Continuity
 
Have all pages the same number of rows ?


--
Regards Ron de Bruin
http://www.rondebruin.nl


wrote in message oups.com...
Thanks Ron. I failed to mention an important part of my problem. The
number of pages in each print block is dynamic, rather than static.
That is, I don't know for sure the number of pages that each print
block will produce. I used 4 pages, 3 pages, and 7 pages to illustrate
my need. In fact, I won't know whether the first print block will
produce 4 pages or 6 pages. Assuming that x number of pages are printed
from the first print block, I'd like the numbering for the second block
of print pages to begin at x+1. And if the second print block produces
y additional pages, then I'd like the numbering for the third block to
begin at x+y+1.

I'm sorry for leaving out the most important part of my dilemma.




[email protected]

Printing -- Page Number Continuity
 
I'm afraid not.


Ron de Bruin

Printing -- Page Number Continuity
 
Difficult

Maybe Jim Rech know it (he is in the group now)

--
Regards Ron de Bruin
http://www.rondebruin.nl


wrote in message oups.com...
I'm afraid not.




Jim Rech

Printing -- Page Number Continuity
 
Just to cover all bases - you cannot print all 3 blocks as 1 print job?

--
Jim
wrote in message
oups.com...
| I'm afraid not.
|



Jim Rech

Printing -- Page Number Continuity
 
Assuming you have to print each block separately, after you set each block
as the print_area you could run this XL4 code:

Dim Pgs As Integer
Pgs = Application.ExecuteExcel4Macro("get.document(50)")

to see how many pages will be printed. And start with that number plus 1
for the next block.


--
Jim
wrote in message
oups.com...
| I'm afraid not.
|



Ron de Bruin

Printing -- Page Number Continuity
 
Very good idea Jim


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jim Rech" wrote in message ...
Assuming you have to print each block separately, after you set each block
as the print_area you could run this XL4 code:

Dim Pgs As Integer
Pgs = Application.ExecuteExcel4Macro("get.document(50)")

to see how many pages will be printed. And start with that number plus 1
for the next block.


--
Jim
wrote in message
oups.com...
| I'm afraid not.
|






All times are GMT +1. The time now is 01:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com