RENAIMING WORKSHEETS - NEED HELP PLEASE

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!
 
G

Guest

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
 
G

Guest

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
 

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

Top