I have a small macro for changing the tab name of a separate worksheet when the value is changed in a specific cell on another sheet called Summary. It works okay but I cant see how to get the tab name to change automatically when the value of the cell C7 changes on the Summary sheet.
Sheet 2 does change when I click on any cell on that page. Can someone please advise?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Sheet2 As Worksheet
Set Sheet2 = ActiveWorkbook.ActiveSheet
Sheet2.Name = "" & Worksheets("Summary").Range("C7").Value
End Sub
Sheet 2 does change when I click on any cell on that page. Can someone please advise?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Sheet2 As Worksheet
Set Sheet2 = ActiveWorkbook.ActiveSheet
Sheet2.Name = "" & Worksheets("Summary").Range("C7").Value
End Sub