Discussion Locked

Excel consec. page #'s thru all tabs

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have seven sheet tabs in a file. Each has 5 pages. Is there a way I can print the entire workbook and have the pages numbered one thru 35?

4 replies

by dklippert

On each Worksheet, go to File>Page Setup and set your page numbering. such as
Page &[Page] of &[Pages]
Now hold down the Ctrl key and select all 7 tabs.
Now when you print the page numbers will be sequential.

by dklippert

BTW, here's away to determine the number of pages after you have grouped the sheets.

Function CountPrintedPages() As Integer
Dim oActive As Object, oSheet As Object
Set oActive = ActiveSheet
Application.ScreenUpdating = False
For EachoSheet In ActiveWorkbook.Sheets
oSheet.Activate
CountPrintedPages = CountPrintedPages + _
ExecuteExcel4Macro("GET.DOCUMENT(50)")
Next oSheet
oActive.Activate
Application.ScreenUpdating = True
End Function

Sub GetPageCount()
PageCount = CountPrintedPages()
MsgBox "The page count is " & PageCount
End Sub

This discussion is closed to new replies.