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

Is there a way to change the names of worksheets automatically? I use Excel
2007 for invoicing, but it's really a pain to have to rename each sheet to
reflect my invoice number.

Is there a formula or solution for this?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 834
Default Automatically update worksheet name

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "H5" '<== change to cell with invoice number

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

"JuneS" wrote in message
...
Is there a way to change the names of worksheets automatically? I use
Excel
2007 for invoicing, but it's really a pain to have to rename each sheet to
reflect my invoice number.

Is there a formula or solution for this?

Thanks!



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
Automatically update excel worksheet formula Robin Excel Discussion (Misc queries) 7 March 3rd 10 02:58 PM
how to automatically update a second worksheet when data inserted maggiemay Excel Worksheet Functions 2 February 17th 10 03:23 PM
Update one worksheet tab to automatically update all other tabs? shoechic1 Excel Worksheet Functions 1 May 24th 09 03:55 PM
How do I automatically update my accountability worksheet from my mls Excel Worksheet Functions 1 February 7th 07 07:49 PM
Copy data into another worksheet and have it update automatically? Taxed Mind Excel Discussion (Misc queries) 4 October 6th 06 12:17 AM


All times are GMT +1. The time now is 06:50 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"