start page numbering after table of contents

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to start page numbering after my table of contents on a single
worksheet. i.e. my worksheet is 40 pages but page 1 is the cover sheet &
page 2 is the TOC. I want to start my page numbering on what I consider page
3. The page numbers should be consecutive starting on page 3.
 
Hi J. Williams

You can do it with code like this

Sub Test()
Dim TotPages As Long
TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
With ActiveSheet.PageSetup
.LeftFooter = ""
ActiveSheet.PrintOut From:=1, To:=2
.LeftFooter = "&P-2 "
ActiveSheet.PrintOut From:=3, To:=TotPages
End With
End Sub
 
Back
Top