The Code Cage - Microsoft Office help Free Microsoft Office Help for all Applications!
Computer Support Service
Dish Network Installation
repair credit      
 

To stop seeing these ads and get other benefits check This page!

Go Back   The Code Cage Forums > Newsgroups - Microsoft Topics > Newsgroup - Excel Forum > Excel Miscellaneous

Custom Search
Translate this Page!
Chat In Use Now! Microsoft Office Chat Online now!


Excel Miscellaneous Post questions in this forum if they are related to using Microsoft Excel that doesn't quite fit in any other category e.g quirks, Formulae or built in functionality etc.

Hey there!

It looks like you're enjoying but haven't created an account yet. Why not take a minute to register for your own free account now? As a member you get free access to all of our forums and posts plus the ability to post your own messages, communicate directly with other members and much more. Register now!

Already a member? Login at the top of this page to stop seeing this message.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 3rd June 2010, 09:56 PM
JuneS
Newsgroup Contributor


My Top Tip Count:

 
Posts: n/a
Chats:
Default Automatically update worksheet name


------ Register to get rid of these "In Post" ads! ------


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?
'Original Source: The Code Cage Forums http://www.thecodecage.com/forumz/excel-miscellaneous/207053-automatically-update-worksheet-name.html#post737711

Thanks!
Reply to this post


Did you find this post helpful? Yes | No
The Code Cage Advertisment
Advertisement

To stop seeing these ads and get other benefits check This page!
  #2 (permalink)  
Old 3rd June 2010, 10:29 PM
Bob Phillips
Newsgroup Contributor


My Top Tip Count:

 
Posts: n/a
Chats:
Default Re: Automatically update worksheet name

------ Register to get rid of these "In Post" ads! ------


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
'Original Source: The Code Cage Forums http://www.thecodecage.com/forumz/excel-miscellaneous/207053-automatically-update-worksheet-name.html#post737733
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" <JuneS@discussions.microsoft.com> wrote in message
news:66342604-8872-4B33-81C3-20364065F43B@microsoft.com...
> 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 to this post


Did you find this post helpful? Yes | No
  #3 (permalink)  
Old 3rd June 2010, 10:39 PM
מיכאל (מיקי) אבידן
Newsgroup Contributor


My Top Tip Count:

 
Posts: n/a
Chats:
Default RE: Automatically update worksheet name

------ Register to get rid of these "In Post" ads! ------


Assuming the Invoice Number is located in cell F4 on each and every sheet and
its format/shape/size/used characters is "legitimate" for a sheets name -
'Original Source: The Code Cage Forums http://www.thecodecage.com/forumz/excel-miscellaneous/207053-automatically-update-worksheet-name.html#post737741
put the following Event-Macro into the ThisWorkBook Module:
----------------------------------------------
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
On Error Resume Next
If Target.Address = "$F$4" Then ActiveSheet.Name = [F4]
End Sub
----------------
Micky


"JuneS" wrote:

> 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 to this post


Did you find this post helpful? Yes | No
The Code Cage Advertisment
Advertisement

To stop seeing these ads and get other benefits check This page!
Reply

Bookmarks

Tags
automatically, update, worksheet


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Forum Jump

The Code Cage Affilliates


To stop seeing these ads and get other benefits check This page!



All times are GMT +1. The time now is 03:58 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.5.1 PL1
No part of this board may be copied or reproduced either in part or full without the express permission of The Code Cage Team.
We are not associated with nor employed by Microsoft in any way, we simply provide resources!
All MS office icons are registered trademarks of the application the represent