Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default dynamic worksheet name

I want to make the worksheet name automatically change to the value in a cell
on that sheet. For example i have a job time sheet with the name of the job
in cell b5; I want the name of the worksheet on the sheet tab at the bottom
to automatically change to the value in cell b5. I am using office 2003 and
office 2007. Any help would be very appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default dynamic worksheet name

Private Sub Worksheet_Change(ByVal Target As Range)
'autoname the worksheet Tab from value in a cell
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("B5")) 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

Right-click on the sheet tab and "View Code".

Copy.paste the code into that module.

Alt + q to return to Excel.

If the name in B5 is the result of a calculation change the event type to

Private Sub Worksheet_Calculate()


Gord Dibben MS Excel MVP


On Tue, 18 Aug 2009 14:49:01 -0700, annajean
wrote:

I want to make the worksheet name automatically change to the value in a cell
on that sheet. For example i have a job time sheet with the name of the job
in cell b5; I want the name of the worksheet on the sheet tab at the bottom
to automatically change to the value in cell b5. I am using office 2003 and
office 2007. Any help would be very appreciated.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Worksheet Name jack[_3_] Excel Worksheet Functions 2 March 27th 09 02:00 PM
Dynamic Worksheet Names HOOS77 Excel Discussion (Misc queries) 3 September 4th 07 10:24 PM
Dynamic Worksheet Lookup Salman Excel Worksheet Functions 1 November 20th 06 07:28 AM
dynamic worksheet reference bmccall17 Excel Worksheet Functions 1 September 19th 05 06:46 PM
Set up a dynamic worksheet Sean Excel Discussion (Misc queries) 0 August 3rd 05 04:45 PM


All times are GMT +1. The time now is 10:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"