Hi all,
In Excel (2003) I have this situation: one Summary worksheet, then a range of sheets containing project information.
From the Summary, with a button a macro can be launched to add a new project sheet. This works perfectly. But I would like to name the new sheet after a cell (say C3) on the new sheet dynamically, i.e. if C3 changes, the sheet name should change immediately, preferably. The initial value (when creating the sheet) may simply be 'Project name here'.
I found a macro that can do this (triggered by a change in that cell), but then this macro should be added automatically to that sheet when creating it, right? I didn't succeed in doing so. That one goes like this:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$3" Then
On Error Resume Next
Me.Name = Target
End If
End Sub
Any idea? Thanks for your time!
In Excel (2003) I have this situation: one Summary worksheet, then a range of sheets containing project information.
From the Summary, with a button a macro can be launched to add a new project sheet. This works perfectly. But I would like to name the new sheet after a cell (say C3) on the new sheet dynamically, i.e. if C3 changes, the sheet name should change immediately, preferably. The initial value (when creating the sheet) may simply be 'Project name here'.
I found a macro that can do this (triggered by a change in that cell), but then this macro should be added automatically to that sheet when creating it, right? I didn't succeed in doing so. That one goes like this:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$3" Then
On Error Resume Next
Me.Name = Target
End If
End Sub
Any idea? Thanks for your time!