![]() |
RENAIMING WORKSHEETS - NEED HELP PLEASE
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! |
RENAIMING WORKSHEETS - NEED HELP PLEASE
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 "LEOPARDSHIDEAWAY" wrote: 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! |
RENAIMING WORKSHEETS - NEED HELP PLEASE
You are a life saver thank you so much!!!!!
"rdwj" wrote: 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 "LEOPARDSHIDEAWAY" wrote: 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! |
All times are GMT +1. The time now is 07:57 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com