Worksheet Name from Cell Value
I've just tried it again and it works fine for me.
Put this line
MsgBox "WS Change event"
try again and see if it returns the MsgBox
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"Edcase" wrote in message
...
Thanks for the code , but it seems not to work. I copied the code straight
from your post and followed the instructions, saved the workbook and
alteredvalue in the cell and nothing. What could I be doing wrong?
"Bob Phillips" wrote:
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A1" '<===== Change to suit
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
Me.Name = Target.Value
End If
ws_exit:
Application.EnableEvents = True
End Sub
'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"Edcase" wrote in message
...
I am building an excel template that uses a sheet as an entry form and
produces several sheets from the information entered. I want the
worksheet
names to come from information entered into specific cells on the
first
sheet.
Many Thanks
|