+ Reply to Thread
Results 1 to 10 of 10

Autoname Tabs by changing cell

  1. #1
    Registered User
    Join Date
    11-09-2007
    Posts
    66

    Autoname Tabs by changing cell

    Is there a way to make the name of a Tab = the contents of a cell.

    For instance if I type "Pizza" in cell B3, I want the current tab to be named "Pizza", but then if I change B3 to "Banana", I want the tab name to change to "Banana" as well.

    Many thanks in advance for any help.

    kc

  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
    Maybe this event macro will help. Right click the sheet tab > select view code and paste in the below

    Please Login or Register  to view this content.
    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
    11-09-2007
    Posts
    66

    Thank you sooooo much for the quick reply

    It works great. Very easy to accomplish with your help. Thank you!

    kc

  4. #4
    Registered User
    Join Date
    11-09-2007
    Posts
    66

    One Step Further

    I actually wanted to have this work by referring to a cell on a different sheet. When I tried it, I couldn't get the names of the Tabs to change. I've attached a spreadsheet with my attempt. Can someone help me to get it to work? Thank you.

    kc

  5. #5
    Registered User
    Join Date
    11-09-2007
    Posts
    66

    Oops! Here's my attempt spreadsheet.

    I forgot to attach the spreadsheet where I made my attempt.
    Here it is.
    Attached Files Attached Files

  6. #6
    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
    This assumes sheets tab's won't be moved...see if it helps

    VBA Noob
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-09-2007
    Posts
    66
    I opened your spreadsheet and saw the code by right-clicking on the Sheet1 tab. I typed "Pizza" in cell C6, and nothing happened. Am I supposed to have code in sheet 2?

  8. #8
    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
    Should work. I can only guess your enableevents has being turned off so try this version

    VBA Noob
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    11-09-2007
    Posts
    66

    Thank you

    That's great

  10. #10
    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
    Glad it helped

    VBA Noob

+ 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