![]() |
Insert total of page in a worksheet in a cell
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 |
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 |
Insert total of page in a worksheet in a cell
Thanks, it's working
"Gord Dibben" wrote: 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 |
All times are GMT +1. The time now is 03:00 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com