Fill across worksheet pages

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.
 
G

Gary''s Student

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top