Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Renaming Sheets automatically
Hi I know i posted this before but I unfortuantely had all my messages
removed from my connection, Can I please have help I am trying to rename the sheet on the tab to the name in cell a14 for example from sheet1 to xyz inc. and I am not sure how private subs work Thanks in advance once again Tami |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Renaming Sheets automatically
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range("A14")) Is Nothing Then With Target Me.Name = .Value End With 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 ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Tami" wrote in message ... Hi I know i posted this before but I unfortuantely had all my messages removed from my connection, Can I please have help I am trying to rename the sheet on the tab to the name in cell a14 for example from sheet1 to xyz inc. and I am not sure how private subs work Thanks in advance once again Tami |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Renaming Sheets automatically
Thankyou it works great
"Bob Phillips" wrote in message ... Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range("A14")) Is Nothing Then With Target Me.Name = .Value End With 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 ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Tami" wrote in message ... Hi I know i posted this before but I unfortuantely had all my messages removed from my connection, Can I please have help I am trying to rename the sheet on the tab to the name in cell a14 for example from sheet1 to xyz inc. and I am not sure how private subs work Thanks in advance once again Tami |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Renaming Sheets | Excel Discussion (Misc queries) | |||
renaming all work-sheets at once | Excel Discussion (Misc queries) | |||
Renaming sheets | Excel Programming | |||
Renaming Sheets in a workbook | Excel Programming | |||
renaming sheets | Excel Programming |