View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
claudio claudio is offline
external usenet poster
 
Posts: 17
Default cell changed - worksheet name changes

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?