Daily "Tabs"

G

Greg Franke

I need to create a macro that will generate a "Tab" or worksheet for every
day of the month. I can not figure out how to programaticaly rename a
spreadsheet after it is added.

if I do sheets.add
What name is it given by default? (is it SheetX?)
How can I rename this worksheet if I do not know the default "X"
name/number it is given?

Thanks!!
Greg
 
G

Gord Dibben

Greg

Name the sheets as you add them.

Sub Add_Sheets()
For i = 31 To 1 Step -1
Worksheets.Add.Name = "January " & i
Next
End Sub


Gord Dibben MS Excel MVP
 

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