+ Reply to Thread
Results 1 to 9 of 9

One Checkbox in group that sets all others to False

  1. #1
    Registered User
    Join Date
    08-06-2019
    Location
    Glasgow, Scotland
    MS-Off Ver
    2016
    Posts
    9

    One Checkbox in group that sets all others to False

    Is there a way I can get one checkbox to essentially disable all others? I have a list of checkboxes with one saying "None" which initialises on True. Can I have it set to false once any other checkbox is used but then also return to true when all other boxes are unchecked?

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: One Checkbox in group that sets all others to False

    Hello FirstClassScamp,

    Welcome to the Forum!

    ...but then also return to true when all other boxes are unchecked?
    Actually, the above should be the other way round. When a CheckBox is "Ticked" its value is True and, when not its value is False.

    It would be much easier for us to maybe assist you, if you can show us what you have thus far.

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Registered User
    Join Date
    08-06-2019
    Location
    Glasgow, Scotland
    MS-Off Ver
    2016
    Posts
    9

    Re: One Checkbox in group that sets all others to False

    Hello, I think I've attached the workbook. Essentially I want the group of checkboxes to open with one already ticked, but then as soon as any other are ticked that would then be unticked. Similarly if that first one is then ticked the others would be all unticked. Almost like two options buttons (yes and no), but instead of a No button it would be a list of options.
    Any help would be very appreciated.

    Chris
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-06-2019
    Location
    Glasgow, Scotland
    MS-Off Ver
    2016
    Posts
    9

    Re: One Checkbox in group that sets all others to False

    A potential different approach would be a question with two options. Then when the second option is selected the list of checkboxes is made available to the user. Is that possible?

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: One Checkbox in group that sets all others to False

    Is there any reason why you do not use option buttons instead?

  6. #6
    Registered User
    Join Date
    08-06-2019
    Location
    Glasgow, Scotland
    MS-Off Ver
    2016
    Posts
    9

    Re: One Checkbox in group that sets all others to False

    Is there a way to use option buttons to then allow a user to access more detail? If they select no then nothing more would display, but if they select yes then options would appear for them to select from?

  7. #7
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: One Checkbox in group that sets all others to False

    Hello FirstClassScamp,

    I have made a few changes to your code and userform. You now have two option buttons to select allergens or not. I have also added an extra procedure to your userform code as shown below.

    Please Login or Register  to view this content.
    Please try the attached sample Workbook.

    Regards.
    Attached Files Attached Files
    Last edited by Winon; 08-10-2019 at 06:48 PM. Reason: Provided Code to Adjust width of Column E to Text Lenght

  8. #8
    Registered User
    Join Date
    08-06-2019
    Location
    Glasgow, Scotland
    MS-Off Ver
    2016
    Posts
    9

    Re: One Checkbox in group that sets all others to False

    That's excellent! Thank you so much for your help!

  9. #9
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: One Checkbox in group that sets all others to False

    Thank you for the feedback, FirstClassScamp,

    Glad I could help. If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    Thanks.

+ 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] If Checkbox is false continue sub
    By gclode in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-12-2015, 11:18 AM
  2. [SOLVED] Marking a whole group FALSE if one member is FALSE
    By j_Southern in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-23-2014, 11:34 AM
  3. [SOLVED] Set CheckBox Value to False even the value is false
    By pipoliveira in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2013, 02:43 AM
  4. Delete Worksheet If Checkbox False
    By heliskier89 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-03-2012, 08:13 AM
  5. Is there a good way to preserve CutCopyMode when VBA sets it to False?
    By foxguy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-18-2010, 11:38 AM
  6. Checkbox: If true all others are false?
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-03-2007, 11:57 AM
  7. [SOLVED] Setting a CheckBox Value to False
    By The Hawk in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-15-2005, 05:05 PM

Tags for this Thread

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