+ Reply to Thread
Results 1 to 6 of 6

Automatic setting of check boxes based on other check boxes?

  1. #1
    Registered User
    Join Date
    07-30-2012
    Location
    San Clemente, ca
    MS-Off Ver
    Excel 2010
    Posts
    3

    Automatic setting of check boxes based on other check boxes?

    I am building a spreadsheet to price software options and I need to include the option to select all options. When one of the individual options are selected, I want the all options check box to be false. Likewise, if someone selects the all options checkbox, I want the others to go false, regardless of what they are set to. Hopefully that is clear enough, 6 individual options and one all options selection, selection any of the individual options unselects the all options check box and the all options box unselects all individual option.

    Thanks

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Automatic setting of check boxes based on other check boxes?

    Sounds like you might want to use Option Buttons instead. Only one can be chosen, others will clear. Alternately, one can have a pseudo checkbox which is controlled by VBA and double clicking. See my attachment on Post #21 of this thread
    http://www.excelforum.com/july-compe...move-tick.html
    Is any of this helpfuL?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    07-30-2012
    Location
    San Clemente, ca
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Automatic setting of check boxes based on other check boxes?

    Chem, thanks for looking at this. Option buttons would be great, except I want the user to be able to select any or all of the options OR the all options button. There are six options the user can buy, or if they want them all, and only if they want them all, I will give them a bundled price.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Automatic setting of check boxes based on other check boxes?

    Here's an example of a spreadsheet which uses the double click method. Double click to add or erase checkmarks. To view the code, right click the tab and "View code" (Thanks to BigBas for helping with this code).
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-30-2012
    Location
    San Clemente, ca
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Automatic setting of check boxes based on other check boxes?

    Here is my specific spreadsheet. I won't add double click, appreciate the thought. If you click on all the options except the OnDemand, you will see pricing populated. When you select the the OnDemand option, you will see the pricing for everything else disappear. I am doing it with math but it would be better and less confusing to just clear all the options above when I click OnDemand, though I can work with this as is. Any other suggestions would be welcome, I am not an Excel user...

    Thanks
    Attached Files Attached Files
    Last edited by ArchiveMike; 07-30-2012 at 07:39 PM.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Automatic setting of check boxes based on other check boxes?

    Okay, I created two short macros. Assign the first macro to your "Base Product" checkbox (Checkbox38_click) and the second macro (CheckboxIndOp_check) to each of the other checkboxes.
    Please Login or Register  to view this content.
    To assign the macro, right click on the checkbox (unprotected spreadsheet) and assign macro> new. Then paste the two macros into the open module. Then right click on the individual checkboxes and assign them to the IndOp macro.
    Did that work for you?

+ 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