View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Add new sheets with week ending dates

Hi Cottage6,

Try:

Sub Tester01()
Dim i As Long
Dim dte As Date

dte = CDate("6 Nov 2004")

For i = 1 To 51
dte = dte + 7
Sheets.Add after:=Sheets(Sheets.Count)
ActiveSheet.Name = "WE " & Format(dte, "mmddyy")
Next

End Sub

---
Regards,
Norman



"cottage6" wrote in message
...
Is there a way I can add 51 new sheets to a workbook that names those
sheets
with a week ending date? Sheet 1 is currently names WE 110604; I would
like
an additional 51 sheets with each new week ending date. Sheet 2 would be
WE
111304, Sheet 3 would be WE 112004, and so on. I appreciate the help,
thanks!