I am trying to rename a tab based on a cell value in another sheet. I would like the tab to be renamed after the cell is changed. I have searched and cannot find a solution. A1 is on Sheet2 and I want it to rename Sheet3. Any help is appreciated. This is what I tried, but obviously it does not work.
Private Sub Worksheet_change(ByVal Target As Range)
If Target.Address = Range("A1") Then
Sheet("Sheet3").Name = Range("A1").Value
End If
End Sub
Private Sub Worksheet_change(ByVal Target As Range)
If Target.Address = Range("A1") Then
Sheet("Sheet3").Name = Range("A1").Value
End If
End Sub