Smithgall
Board Regular
- Joined
- May 24, 2006
- Messages
- 68
i am using the following code
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
On Error Resume Next
If Not Intersect(Sh.Range("A1"), Target) Is Nothing Then Sh.Name = Target.Value
End Sub
It works fine but my problem is that each tab has A1 filled as a reference back to the "NAMES" sheet (=Names!B3). Meaning that names tab has a list of 1-x each with a corresponding name. then i have a sheet for each name. The above code works when i go to each sheet and type in the name in A1 but it does not work when the "Names" sheet is updated and therefore updates its corresponding sheet name. Any suggestions?
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
On Error Resume Next
If Not Intersect(Sh.Range("A1"), Target) Is Nothing Then Sh.Name = Target.Value
End Sub
It works fine but my problem is that each tab has A1 filled as a reference back to the "NAMES" sheet (=Names!B3). Meaning that names tab has a list of 1-x each with a corresponding name. then i have a sheet for each name. The above code works when i go to each sheet and type in the name in A1 but it does not work when the "Names" sheet is updated and therefore updates its corresponding sheet name. Any suggestions?