I want to create and name 365 worksheets...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to create 365 worksheets and name them for each day of 2006. I would
like to avoid typing each tab.

Can someone explain the method to do this?

Darrell
 
Hi Darrell

Try this

Sub test()
Dim I As Integer
For I = 1 To 365
Sheets.Add after:=Sheets(Sheets.Count)
ActiveSheet.Name = Format(DateSerial(2006, 1, I), "yyyy-mmm-dd")
Next
End Sub
 

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

Back
Top