Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Is it possible to return the total pages in a workbook? I know the formula
for sheets (or tabs), but at least one sheet, when printed has 2 or more pages. Thanks in advance. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
As far as I know there is not a built in function for this.
There are some methods available using VBA. This displays the count. Sub printcounter() wscount = ActiveWorkbook.Worksheets.Count For a = 1 To wscount Sheets(a).Activate PAGECOUNT = Application.ExecuteExcel4Macro("Get.Document(50)") + PAGECOUNT Next a MsgBox (PAGECOUNT & " Pages to Print") End Sub -- If this helps, please remember to click yes. "NAHolmes" wrote: Is it possible to return the total pages in a workbook? I know the formula for sheets (or tabs), but at least one sheet, when printed has 2 or more pages. Thanks in advance. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks Paul.
The sub did display the total pages, but it also moved all the text boxes in the workbook. Also, is it possible to return the number to a cell? Thanks again for your help. "Paul C" wrote: As far as I know there is not a built in function for this. There are some methods available using VBA. This displays the count. Sub printcounter() wscount = ActiveWorkbook.Worksheets.Count For a = 1 To wscount Sheets(a).Activate PAGECOUNT = Application.ExecuteExcel4Macro("Get.Document(50)") + PAGECOUNT Next a MsgBox (PAGECOUNT & " Pages to Print") End Sub -- If this helps, please remember to click yes. "NAHolmes" wrote: Is it possible to return the total pages in a workbook? I know the formula for sheets (or tabs), but at least one sheet, when printed has 2 or more pages. Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Filter results returning a count __ of __ | Excel Discussion (Misc queries) | |||
Formula Question involving two columns and returning a count | Excel Discussion (Misc queries) | |||
COUNT returning 0? | Excel Worksheet Functions | |||
Page Count | Excel Discussion (Misc queries) | |||
returning a count if two conditions are met | Excel Worksheet Functions |