+ Reply to Thread
Results 1 to 8 of 8

Checkbox-based actions

  1. #1
    Registered User
    Join Date
    07-02-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    10

    Checkbox-based actions

    I've looked everywhere, and am unable to find anything that suits my needs (which may mean what I'd like to do isn't possible).

    I would like to have a script to make the sheet tab color change depending on the status of a checkbox. I can assign a macro to the checkbox that will change the color when checked, but I would like it to revert colors if the box is unchecked. I have tried all kinds of if/then's, but no luck so far.

    Is this possible, and if so, how?

    Thanks!

  2. #2
    Registered User
    Join Date
    08-02-2012
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Checkbox-based actions

    it depends on a few characteristics but here is an example of how you might go about it:

    Please Login or Register  to view this content.
    note this is in the checkbox click event and in this case I'm setting the color to blue when checked and no color when unchecked.

    Does this help?

  3. #3
    Registered User
    Join Date
    07-02-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Checkbox-based actions

    perhaps I am doing something wrong, but it seems that the checkbox does not like the if/then's. I also tried linking the check box to a cell and doing an if/then based upon the TRUE or FALSE in that cell, but still not results.

  4. #4
    Registered User
    Join Date
    08-02-2012
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Checkbox-based actions

    is the checkbox on a worksheet or on a form?

    if it is on a worksheet, are you using a form checkbox or an activex checkbox?

    the code I posted above is for an activex checkbox.

  5. #5
    Registered User
    Join Date
    07-02-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Checkbox-based actions

    It's a form box on a worksheet. Let me try with an activex checkbox.

  6. #6
    Registered User
    Join Date
    07-02-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Checkbox-based actions

    Perfect! Thank you so much!

  7. #7
    Registered User
    Join Date
    08-02-2012
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Checkbox-based actions

    No problem!

    FYI with a form control you need to link it to a cell and check the cell value rather than the checkbox value itself.

  8. #8
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Checkbox-based actions

    @ busterbluth123

    Welcome to the forum.

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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