cell changed -> worksheet name changes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want the active worksheet to be renamed if the user changes cell G7.
The name comes from worksheet "List", cell D15 (this part works).

The following code has no effect:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = "$G$7" Then ActiveSheet.Name =
Worksheets("List").Range("D15").Value
End Sub

What am I doing wrong?
 
your original code looks fine and it worked fine for me. "Excelent's" code
is functionally equivalent so I wouldn't expect it to solve your problem (but
who knows).

I would suggest that you have events disabled.

Try running this macro

Sub TurnOnEvents()
Application.EnableEvents = True
End Sub
 
Unless it was a fluk, somewhere you might have the command

application.enableevents = False

perhaps it is from a 3rd party addin that errored out before it reenabled
them.
 
Back
Top