+ Reply to Thread
Results 1 to 4 of 4

How to Activate Sheets with Changing Names

  1. #1
    Forum Contributor
    Join Date
    02-18-2014
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2013
    Posts
    197

    How to Activate Sheets with Changing Names

    I have a workbook that changes the worksheet names using cells on an "inputs" tab with the following code:

    Please Login or Register  to view this content.

    My question is, how do I activate sheets when the names change. Sheets("Sheet1").Select wouldn't work. Right?

    I attached a sample...hopefully it makes sense.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: How to Activate Sheets with Changing Names

    Hi phelbin,

    Use the sheet code name to select the tab - i.e. for the tab currently called "BLNG" you'd use this:

    Please Login or Register  to view this content.
    See here for more info.

    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Forum Contributor
    Join Date
    02-18-2014
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2013
    Posts
    197

    Re: How to Activate Sheets with Changing Names

    The code works, but everything is out of order. I figured it would be based on the sheet order, but it seems like it might be based on the order in which I created the sheets?

    Can I change that to be just the order that they appear on the bottom of the screen?

    And thanks so much for your help!

  4. #4
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: How to Activate Sheets with Changing Names

    If you want to select a tab (say "BLNG" to keep it consistent) based on its position (furthest left to furthest right) you'd use this:

    Please Login or Register  to view this content.
    HTH

    Robert

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Activate variable INTERNAL sheet names
    By rpinxt in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 03-14-2016, 03:39 AM
  2. Formula to look at sheets with changing names
    By satkin2 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-18-2015, 08:55 AM
  3. Sheets(1).Activate versus Sheets([1]).Activate
    By YOO629 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-12-2015, 12:01 PM
  4. can I activate workbooks without writing their names in code?
    By lubbamkt in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-11-2014, 12:55 PM
  5. Command button do not activate until changing cell.
    By Hybris6 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-23-2013, 09:04 AM
  6. [SOLVED] Activate Workbook with Changing Filename
    By ktennies in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-17-2013, 03:22 PM
  7. [SOLVED] Positioning Worksheet names on Activate
    By JimMay in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-02-2006, 08:50 AM

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