cell changed -> worksheet name changes

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?
 
G

Guest

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top