Worksheet Tab Name

N

Neil_Dell

How can I automatically add code so the name of the sheet is the same as cell
A1?
Thanks
 
D

Don Guillett

right click sheet tab>view code>insert this>save.
Now whenever a1 changes the name will change to that

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$A$1" Then End
ActiveSheet.Name = Target
End Sub
 
N

Neil_Dell

Don Guillett said:
right click sheet tab>view code>insert this>save.
Now whenever a1 changes the name will change to that

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$A$1" Then End
ActiveSheet.Name = Target
End Sub


--
Don Guillett
SalesAid Software
[email protected]



Thanks Don,
However, nothing happens. Is it because in cell a1 there is a formula?
 
B

Bob Tarburton

Don
Don
Is there a way to make this run upon recalculation if I have a formula in
A1?
 
Top