Calculating pagenumbers before printing

P

PO

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
 
Top