Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dk dk is offline
external usenet poster
 
Posts: 129
Default determine range for printed pages

The following code returns the page count for printed pages - Is it
possible to also find out the range for each page which will be printed,
based on this page count?

PageCount = 0
For Each sht In Worksheets
sht.Activate
Pages = ExecuteExcel4Macro("Get.Document(50)")
PageCount = PageCount + Pages
Next sht
MsgBox "Total Pages = " & PageCount

tia,
dk
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 434
Default determine range for printed pages

hi, dk !

The following code returns the page count for printed pages
Is it possible to also find out the range for each page which will be printed, based on this page count?
PageCount = 0
For Each sht In Worksheets
sht.Activate
Pages = ExecuteExcel4Macro("Get.Document(50)")
PageCount = PageCount + Pages
Next sht
MsgBox "Total Pages = " & PageCount


AFIAK, for each 'sht' it should be the usedrange.address...
unless, you have a customized printarea, printtitlerows/columns, ???
where you would need to find out through each 'sht' pagesetup properties

hth,
hector.


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
number of pages will be printed Jon Excel Discussion (Misc queries) 0 November 17th 08 09:24 AM
Printed multiple pages per sheet hmm Excel Discussion (Misc queries) 4 January 3rd 08 07:58 AM
i would like that my first line to appear in all printed pages hagar Excel Discussion (Misc queries) 1 February 27th 06 12:44 PM
Excel 2003 - Determine the number of printed pages SMORGS Excel Programming 0 December 5th 05 10:56 PM
headers across printed pages Myrna Larson Excel Worksheet Functions 1 October 3rd 05 10:03 PM


All times are GMT +1. The time now is 03:56 PM.

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

About Us

"It's about Microsoft Excel"