LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default how can I count the vertical pages of a print job?

I am trying to write some code where I am trying to stay within the one page
width by however many pages long. I don't like Excel's automatic page set-up
because sometimes it doesn't maximize the printed page space so I have done
the following ...

i = 10
ActiveSheet.DisplayAutomaticPageBreaks = True
ActiveSheet.PageSetup.Zoom = i
'keep going up til 1 then drop back down one
Do Until ActiveSheet.VPageBreaks.Count = 1
i = i + 1
ActiveSheet.PageSetup.Zoom = i
Loop
i = i - 1
ActiveSheet.DisplayAutomaticPageBreaks = False

Do you have any ideas as to why my code doesn't work? It appears I am not
using the vpagebreaks properly ... any ideas .... ?

Thank you !!
 
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
Number of pages in worksheet doesn't match Print Preview pages delru Excel Discussion (Misc queries) 2 May 10th 10 10:08 PM
how do i print pages of pages example (1of3) rene Excel Discussion (Misc queries) 2 May 21st 09 05:03 PM
How to print odd pages and even pages seperately in Excel. DILNAVAS Excel Discussion (Misc queries) 1 June 14th 06 11:45 AM
How do I not print or count pages? Excel97 Rookie 1st class Excel Programming 5 November 16th 05 09:09 AM
Can I print only specified pages from a print range such as pages 1,3,4,6 Mel Excel Programming 2 April 12th 05 02:25 PM


All times are GMT +1. The time now is 11:40 AM.

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"