C
cottage6
I want to save a 2004 file and modify it to use for this year, as I need some
of the data. There are 52 sheets in the current file labeled with 2004
Saturday week ending dates. I have code as follows that created the sheets
and labeled them. Since the sheets will already exist and be named when I
copy the file over, I wondered if there was a way to rename them with 2005
week ending dates. Any help would be greatly appreciated!
Dim i As Long
Dim dte As Date
dte = CDate("1 JAN 2005")
For i = 1 To 51
dte = dte + 7
Sheets.Add after:=Sheets(Sheets.Count)
ActiveSheet.Name = "WE " & Format(dte, "mmddyy")
Next
End Sub
of the data. There are 52 sheets in the current file labeled with 2004
Saturday week ending dates. I have code as follows that created the sheets
and labeled them. Since the sheets will already exist and be named when I
copy the file over, I wondered if there was a way to rename them with 2005
week ending dates. Any help would be greatly appreciated!
Dim i As Long
Dim dte As Date
dte = CDate("1 JAN 2005")
For i = 1 To 51
dte = dte + 7
Sheets.Add after:=Sheets(Sheets.Count)
ActiveSheet.Name = "WE " & Format(dte, "mmddyy")
Next
End Sub