itsgrady
Board Regular
- Joined
- Sep 11, 2022
- Messages
- 132
- Office Version
- 2021
- Platform
- Windows
- MacOS
The below code was working. For some reason it stopped working. I am not sure why. I would like to update the code but it is not working. I need to keep "Format(rs.Range("C3").Value, "mm-dd-yy")" and I would like to change one sheet at a time (current sheet). I copy a new sheet weekly and would to rename the sheet through the value in C3 on the same sheet when I push a button to launch the code. I know how to create the button but I do need help with the code. Thanks for the help with the code.
Sub RenameSheet()
Dim rs As Worksheet
For Each rs In Sheets
rs.Name = Format(rs.Range("C3").Value, "mm-dd-yy")
Next rs
Sub RenameSheet()
Dim rs As Worksheet
For Each rs In Sheets
rs.Name = Format(rs.Range("C3").Value, "mm-dd-yy")
Next rs