sheet tabs

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

steve

Hello
can some one tell me where and how to automaticly name or
number the sheets in a work book, I have the formula but
can't remember where to use it to put dates in the tabs
for 52 weeks

thanks
steve
 
Steve,

This code snippet will do it.

Just change the start date to suit.

Sub AddDates()
Dim sDate As Date
Dim sh As Worksheet

sDate = "01/01/2003"
For Each sh In ActiveWorkbook.Worksheets
sh.Name = Format(sDate, "dd mmm yyyy")
sDate = sDate + 7
Next
End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top