The code that you posted does not work for me. A slight alteration does
however:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If ActiveSheet.Name = Sheets("Schedule").Range("E6").Value Then Exit Sub
ActiveSheet.Name = Sheets("Schedule").Range("E6").Value
End Sub
Right-click on the sheet tab for the sheet relating to the name in E6 of the
"Schedule" sheet and select View Code. Ensure that you are in the sheet
module and that it says "Worksheet" and not "General" in the top left
window. If the right window does not say "SelectionChange" click on the
arrowhead and select it.
I would delete eveything in the module, (should be an empty
Worksheet_SelectionChange Macro), copy and paste the above code into the
module.
For the other sheets paste the code into the Worksheet module of that sheet
and change the Range("E6") reference to the correct cell.
The sheet name should change when you select any cell in the worksheet.
--
HTH
Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings
[email protected]
Replace @mailinator.com with @tiscali.co.uk