sequentially assign a single number to each worksheet

  • Thread starter Thread starter tombeaty
  • Start date Start date
T

tombeaty

What I need to do is: sequentially assign a single number
to each worksheet. This worksheet number would be along
the same lines as a Page number. Preferably included in
the footer. This number will need to remain static even
if the worksheet should grow beyond a single printed
page. The number will only increase by one when the next
worksheet is printed.

Any thoughts on how I could accomplish this?
 
Try something like this:

Dim x as Integer

For x = 1 to ActiveWorkbook.Worksheets.Count
Sheets(x).Select
With ActiveSheet.PageSetup
.LeftFooter = "Sheet " & x & "Page &P of &N"
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Next

Caution: working with PageSetup in code slows things down...
 
Back
Top