View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Determining number of pages

Hi

You can use

Dim TotPages As Long
TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")



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


"bhofsetz" wrote in message
...

Is there a method to find out the number of pages that will be printed
with VBA code? Somehow invoking the print preview window and then
retrieving the total pages that will be printed automatically.

Thanks


--
bhofsetz
------------------------------------------------------------------------
bhofsetz's Profile: http://www.excelforum.com/member.php...o&userid=18807
View this thread: http://www.excelforum.com/showthread...hreadid=539399