Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Is there a method to find out the number of pages that will be printe with VBA code? Somehow invoking the print preview window and the retrieving the total pages that will be printed automatically. Thank -- bhofset ----------------------------------------------------------------------- bhofsetz's Profile: http://www.excelforum.com/member.php...fo&userid=1880 View this thread: http://www.excelforum.com/showthread.php?threadid=53939 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks Ron. Just what I was after Is that similar to using BuiltinDocumentProperties ? I found that in the Excel VBA help but was unsuccessful getting it to return the number of pages in my worksheet. -- bhofsetz ------------------------------------------------------------------------ bhofsetz's Profile: http://www.excelforum.com/member.php...o&userid=18807 View this thread: http://www.excelforum.com/showthread...hreadid=539399 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi bhofsetz
Never try it but this is not working for me Sub Test() With ActiveWorkbook.BuiltinDocumentProperties MsgBox .Item("Number of pages") End With End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "bhofsetz" wrote in message ... Thanks Ron. Just what I was after Is that similar to using BuiltinDocumentProperties ? I found that in the Excel VBA help but was unsuccessful getting it to return the number of pages in my worksheet. -- bhofsetz ------------------------------------------------------------------------ bhofsetz's Profile: http://www.excelforum.com/member.php...o&userid=18807 View this thread: http://www.excelforum.com/showthread...hreadid=539399 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Number of pages in worksheet doesn't match Print Preview pages | Excel Discussion (Misc queries) | |||
Determining the highest number in a row | Excel Discussion (Misc queries) | |||
Determining the highest number in a row | Excel Discussion (Misc queries) | |||
need help determining a row number | Excel Programming | |||
Determining Row Number | Excel Programming |