+ Reply to Thread
Results 1 to 5 of 5

macro to select worksheet based on tab color

  1. #1
    Registered User
    Join Date
    02-01-2012
    Location
    ny
    MS-Off Ver
    Excel 2003
    Posts
    8

    macro to select worksheet based on tab color

    Hi can anyone help me create a macro that selects all worksheet tabs of a particular color. For instance, if i am selecting a worksheet that the tab is colored red, what is the vba code to select all red tabs in the workbook?

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: macro to select worksheet based on tab color

    just try...
    Please Login or Register  to view this content.
    and
    Please Login or Register  to view this content.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  3. #3
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: macro to select worksheet based on tab color

    replace the number with your own color number

    Please Login or Register  to view this content.
    You can find out about the tab color by using
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-01-2012
    Location
    ny
    MS-Off Ver
    Excel 2003
    Posts
    8
    What if I want the macro to be written so that if I click on a tab of any color all tabs of that color.in the workbook are selected. Thx for ur help:D

  5. #5
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: macro to select worksheet based on tab color

    In that case put this in your workbook module. I use a conditional check box to turn on/off macro. In my case, if worksheet macro on and off range A1 = True then macro is active, if A1= False then macro is inactive.

    Anyone know why I am having issue with checkbox active x control? If I use checkbox as a conditional check if won't let me go into Design mode unless I select other tab first.

    Please Login or Register  to view this content.

+ 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