RENAIMING WORKSHEETS - NEED HELP PLEASE

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

Guest

i have several worksheets with the weeks as the title. i need to change for
our new year. Can someone please give me the code to change the worksheets
to add 7 days to each worksheet. example 10-8 and 10-15 and 10-22 etc.

That would be very helpful

Thank you!
 
Sub rename_sheets()
Dim MyDate As Date
MyDate = "1/1/07"
For Each myworksheet In ActiveWorkbook.Sheets
myworksheet.Name = Application.WorksheetFunction.Text(MyDate, "mm-dd")
MyDate = MyDate + 7
Next
End Sub
 
You are a life saver thank you so much!!!!!

rdwj said:
Sub rename_sheets()
Dim MyDate As Date
MyDate = "1/1/07"
For Each myworksheet In ActiveWorkbook.Sheets
myworksheet.Name = Application.WorksheetFunction.Text(MyDate, "mm-dd")
MyDate = MyDate + 7
Next
End Sub
 
Back
Top