View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Calculating pagenumbers before printing

John Walkenbach's site:

Determining the number of pages to be printed in a worksheet
http://www.j-walk.com/ss/excel/tips/tip65.htm


--
Regards,
Tom Ogilvy


"PO" <po wrote in message ...
Is there any way to calulate the total pagenumbers before printing a
worksheet?

I want to do the following:

Sub PrintTest
numPages = calulate the number of pages to be printed
activesheet.range("D10").value=numPages
activesheet.printout
End Sub

I don't want to use the &N formatcode in the page header/footer.

Regards,
PO