+ Reply to Thread
Results 1 to 18 of 18

Funtion/Code to rename a sheet/tab

  1. #1
    Registered User
    Join Date
    10-11-2007
    Posts
    25

    Funtion/Code to rename a sheet/tab

    Is there a function to do this or only VB code?

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Only with VBA

    Link may help

    http://www.excelforum.com/showthread.php?t=619875

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    10-11-2007
    Posts
    25
    how do you request to name the sheet with the contents of a cell from another sheet, for example - sheet2?
    You could set up a template if you need to do it a lot

    http://office.microsoft.com/en-us/ex...292861033.aspx

    or maybe this event macro. Right click each sheet and select view code and paste in the below then Sheet will rename to value in A1

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    10-11-2007
    Posts
    25
    using the above code (sorry!)

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Is the value in sheet 2 a formula or a user entry

    VBA Noob

  6. #6
    Registered User
    Join Date
    10-11-2007
    Posts
    25
    a user entry

  7. #7
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try this in sheet 2. Changes the first sheet to Sheet 2 cell A1 value

    Please Login or Register  to view this content.
    VBA Noob

  8. #8
    Registered User
    Join Date
    10-11-2007
    Posts
    25
    didnt work... basically, im setting up a sales tracker at work and need a function which will allow other managers to input their staff into (for this example, sheet2) a sheet and it automatically updates all of the other sheets with these names, renaming the tabs also. Its the renaming the tabs bit im finding to be a nightmare!

  9. #9
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    See example

    VBA Noob
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    10-11-2007
    Posts
    25
    cheers, thats great!

    what would i need to edit in that code to get that to work on upto ten sheets? I guess we're straying into "complicated" if i wanted to allow the user to constantly re-name a sheet, like if a staff member leaves, using a similar code?

  11. #11
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    See if link is of use

    http://www.excelforum.com/showthread.php?t=622471

    VBA Noob

  12. #12
    Registered User
    Join Date
    10-11-2007
    Posts
    25
    It almost works!

    It allows me to contantly change the tab name of the tab with the VB code but it wont let me obtain the information for the tab name from a seperate sheet (eg - staff - this contains all of the staff members, a user would key their names into this and it would re-name each tab appropriately)

    i was trying a B3='staff'B3 kind of thing with your code as thre base but - didnt work

  13. #13
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Can you post an example of your structure and highlight the cells the user changes and which sheet should change

    VBA Noob

  14. #14
    Registered User
    Join Date
    10-11-2007
    Posts
    25
    here you go
    Attached Files Attached Files

  15. #15
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Does this help

    VBA Noob
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    10-11-2007
    Posts
    25
    totally!

    thanks alot!

  17. #17
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Your welcome

    VBA Noob

  18. #18
    Registered User
    Join Date
    10-11-2007
    Posts
    25
    that code worked at first but now doesnt...

    how would i go about changing the range to include other sheets (named Sheet1-Sheet10)?

    the cells which control the tab names would be:

    C10, f110 i10, L10, c14, f14, i14, L14, f18, i18

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1