naming tabs

  • Thread starter Thread starter steve
  • Start date Start date
S

steve

Hello
I would like to use a macro to name the sheets in a workbook.
I want the tabs to be named Jan & year through Dec & year.
I know I don't have to ask if it is possible, you people are great thanks in
advance for the help.
 
Sub missive()
s = Array("jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep",
"oct", "nov", "dec")
For i = 1 To 12
Sheets(i).Name = s(i - 1) & " 2008"
Next
End Sub

mind the text wrapping!!
 
Sub namesheets()
With Sheet1
my = Year(Date)
mm = 0
End With

For i = 1 To 12
Sheets.Add After:=Sheets(Sheets.Count)
With ActiveSheet
.Name = Format(DateSerial(my, mm + i, 1), "mmm yy")
End With
Next i
End Sub
 
Back
Top