+ Reply to Thread
Results 1 to 10 of 10

Conditional Formatting - Worksheet Tabs

  1. #1
    Registered User
    Join Date
    10-04-2007
    Posts
    32

    Conditional Formatting - Worksheet Tabs

    Heya People's!

    What I would like to do is change the colour of a worksheet tab. I only want the worksheet tab to change colours though if a condition in that one worksheet becomes true (goes into effect), if there is no condition, or if the condition returns back to being false, then I want the tab to remain in its default setting.

    Is changing the tabs like this even possible? If it is possible, can anyone point me into the right direction of doing this?

    Thanks in advance,
    Nubbers
    Last edited by Nubbers; 12-12-2007 at 02:30 PM.

  2. #2
    Registered User
    Join Date
    10-04-2007
    Posts
    32
    Bump! Completely re-edited the question to be more understandable! (is that even a word?!)

  3. #3
    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 this gets you started

    Right click the sheet tab > select view code > paste in the below

    If A1 is > then 10 the sheet tab will turn Red otherwise it will stay grey

    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 !!!

  4. #4
    Registered User
    Join Date
    10-04-2007
    Posts
    32
    Wow thanks for the quick reply!

    I was trying to make it easy and just find a way to use the code you gave in my spreadsheet, the code worked if I manually put in the number, but if I had a formula in the cell it wouldn't work...

    I was wondering if it's possibly for the code to look at the whole worksheet, and if one or more of the cells has red font, to make the tab red, and if none of the cells has red font, to put it back to its default. I've been trying to figure out how to write this myself, but my vba skills are extremely limited.

    Thanks again!!
    Nubbers

  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
    Not great with code myself but give this a try

    Amended
    Please Login or Register  to view this content.
    Sorry

    Code in normal module to count font colour from Chip pearson site

    Please Login or Register  to view this content.
    VBA Noob
    Last edited by VBA Noob; 12-12-2007 at 05:05 PM.

  6. #6
    Registered User
    Join Date
    10-04-2007
    Posts
    32
    Hey vba noob, thanks for all the help!!! you've helped me go so far!!!

    The only problem is, the code works, only if I physically go in and change the font colour to red, the problem is I have it conditionally formatted to change red, for some reason, if the condition changes the number to red, the macro doesn't pick it up

    I'm going to continue looking to see if I can find anything!

    Thanks again,
    Nubbers

  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
    You didn't mention the CF part.

    Guess you could code to trigger the font change instead of CF

    VBA Noob

  8. #8
    Registered User
    Join Date
    10-04-2007
    Posts
    32
    Sorry thought that the conditional formatting was understood in the beginning of the post! My mistake!

    I could do that, but its a very long process and didnt think coding the condition would be the best because what it does, is it double checks that one number in cell b2 equals c2...and so on...the thing is though, it does that for about 100 rows. it double checks basically all the tabs and the formulas within them.

    I'm going to keep looking for a solution! I found the pearson site, and its very useful!

    Thanks again,
    Nubbers

  9. #9
    Registered User
    Join Date
    01-22-2013
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Conditional Formatting - Worksheet Tabs

    This sounds similar to what I'm trying to do... http://www.excelforum.com/excel-prog...n-be-done.html

    Thoughts?

  10. #10
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Conditional Formatting - Worksheet Tabs

    ninj5,

    Its better if you bump your own thread. This is a 5+ yr old thread and you are not likely to get a reply.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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