ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   RENAIMING WORKSHEETS - NEED HELP PLEASE (https://www.excelbanter.com/excel-discussion-misc-queries/151868-renaiming-worksheets-need-help-please.html)

LEOPARDSHIDEAWAY

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!

rdwj

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!


LEOPARDSHIDEAWAY

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