Fill across worksheet pages

  • Thread starter Thread starter Cyara
  • Start date Start date
C

Cyara

I'm creating an invoice book and I want to number each page eg Inv 09/1, Inv
09/2, Inv 09/3; etc.
 
The first step is to create a blank workbook with the correct number of blank
worksheets:

Sheet1, Sheet2, ..........

Then run the following macro to rename the sheets:

Sub RenameSheets()
Dim sh As Worksheet
Dim b As String, c As Variant
b = "09_"
c = 1
For Each sh In Worksheets
sh.Name = b & c
c = c + 1
Next
End Sub

Note that _ is used. That is because /\ are not allowed in tab names.
 
Back
Top