I've read several other posts and am not getting my code quite right.
I need to change a sheet name (daily) based on the value in another cell on another worksheet. I read the post here regarding changing sheet name with a date suffix so I am basing my code on that.
I've placed this code within the sheet module I am trying to rename (which happens to be Sheet22).
The place where I have stored the value for the sheet name (which will change daily dynamically) is on Sheet17 in cell L17.
I have also read the article by Tom Urtis and I get the general concept but the code is much more than I need.
I'm looking for something simple that will change the sheet name based on input from a cell value that will change dynamically based on data from another range.
The code above is giving me a Run time error 9: subscript out of range
Any assistance would be greatly appreciated.
TcO
I need to change a sheet name (daily) based on the value in another cell on another worksheet. I read the post here regarding changing sheet name with a date suffix so I am basing my code on that.
I've placed this code within the sheet module I am trying to rename (which happens to be Sheet22).
The place where I have stored the value for the sheet name (which will change daily dynamically) is on Sheet17 in cell L17.
Code:
Private Sub Rpt1_sheetrename()
ActiveSheet.Name = Worksheets("Sheet17").Range("L17")
End Sub
I have also read the article by Tom Urtis and I get the general concept but the code is much more than I need.
I'm looking for something simple that will change the sheet name based on input from a cell value that will change dynamically based on data from another range.
The code above is giving me a Run time error 9: subscript out of range
Any assistance would be greatly appreciated.
TcO