Re-Name a Worksheet..... with a Twist
Can't seem to get it to work. I have placed a value in A1 but nothing
happens. How can I initiate it?
"Frank Kabel" wrote in message
...
Hi
Put the following code in your worksheet module:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("A1")) Is Nothing Then Exit Sub
On Error GoTo CleanUp
application.enableevents = false
With Target
If .Value < "" Then
Me.Name = .value
End If
End With
CleanUp:
Application.EnableEvents = True
End Sub
--
Regards
Frank Kabel
Frankfurt, Germany
"John" schrieb im Newsbeitrag
...
I want to created a new worksheet via a macro button on say sheet1 -
I can
do that thats not a problem
Then I want to re-name the new worksheet with a value that is typed
in on a
certain cell in this new sheet2. Obviously I can't re-name until I
create
the worksheet in the first place. How can I create an event to do
this after
I have typed in to this cell.
I'm trying to set up a holiday timesheet, with a new sheet for each
employee
Thanks
|