View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Insert total of page in a worksheet in a cell

Sub Test()
Dim TotPages As Long
TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
ActiveSheet.Range("A1").Value = TotPages
End Sub


Gord Dibben MS Excel MVP

On Tue, 18 Aug 2009 09:51:01 -0700, catherine
wrote:

Hi,

In Excel 2003, do you know how I can insert in a cell the totals pages (only
print page) that I have in the worksheet.

I don't want to use the header and footer function.

Thanks