I have the following code:
Sub TabName()
ActiveSheet.Name = ActiveSheet.Range("A5")
End Sub
The above code works fine, though I have to run the macro each time manually.
I am trying to make it dynamic using the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$5" Then
ActiveSheet.Name = ActiveSheet.Range("A5")
End If
End Sub
This code does not do what I expect it to do, which is rename the sheet if i change the text in cell A5.
Any help would be appreciated.
Bookmarks