Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 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.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Printing -- Page Number Continuity

I'm afraid not.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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.



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default 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.
|


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default 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.
|


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Printing --Borders are not printing on the same page as data Stup88 Excel Discussion (Misc queries) 1 August 7th 07 09:34 AM
Page Breaks- Printing selected rows on same page ToddEZ Excel Discussion (Misc queries) 1 July 18th 07 04:38 PM
Continuity of the series Joe Excel Discussion (Misc queries) 3 October 19th 06 05:23 PM
How I can find breaks in continuity tweacle Excel Worksheet Functions 1 April 9th 06 08:34 PM
Formatting Continuity Margaret Foster Excel Discussion (Misc queries) 1 June 7th 05 08:58 PM


All times are GMT +1. The time now is 07:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"