+ Reply to Thread
Results 1 to 3 of 3

multiple checkboxes macro check/uncheck

  1. #1
    Registered User
    Join Date
    11-05-2012
    Location
    shelton, wa
    MS-Off Ver
    Office 365
    Posts
    24

    multiple checkboxes macro check/uncheck

    Hello, I am wondering how to force a checkbox to uncheck. Basically a simple way to put it is that I have 10 rows and 5 columns with a check box in each cell on Sheet1, these link up to corresponding cells in Sheet2 where the TRUE/FALSE shows. My goal is to allow any or all checkboxes in a column to be checked or unchecked so A1:A10 can all be checked or unchecked, but a row can only have one checkbox checked at any given time. So the total amount allowed to be checked on the sheet at any given time would be 10, one check allowed (max) for each row. Option buttons will not allow me to select multiple rows they only allow me to choose one box out of the 50 possible if I am correct. So if I check A5, B5/C5/D5/E5 will all be unchecked, and if I choose then B5, A5/C5/D5/E5 will all be unchecked. Thank you.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Option buttons can do what you want if
    you group each row of option buttons.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    11-05-2012
    Location
    shelton, wa
    MS-Off Ver
    Office 365
    Posts
    24

    Re: multiple checkboxes macro check/uncheck

    That suggestion worked, now I have an interesting problem. I have 7 columns of Option Buttons (ActiveX), each column has 75 rows below with option buttons on them and they all link to different cells on another sheet (Sheet 2) in the workbook, so it's like a 7 x 75 grid of Option Buttons because each row has seven options to choose from and no row can have more than one choice (hence the grouping of the individual rows), but each column can have multiple selections. This part all works. I created a macro and assigned it to a button called Clear All Option Buttons. Basically you click it and it goes to the linked cells on Sheet 2 and searches for the word TRUE and changes it to FALSE. When I click this all the Option Buttons clear, perfect! Now I have 7 other macros each assigned to a Form Control Button above each of the seven columns Select All Column A, Select All Column B, etc... You click on this and the Macro is supposed to work like the clear all button, but it also then changes all the values in the column below it to TRUE while the other columns are changed to FALSE.

    This is where I am having a problem. If I select say the Macro on the top of Column A “Select All Column A”, it clears all the other Columns of B through G changing them to FALSE and makes all the ones in Column A TRUE. This all works on Sheet 2 and you can see the changes on that sheet, the linked cells have correctly changed from TRUE to FALSE and FALSE to TRUE for the Selected Column. But on Sheet one where the Option Buttons (RADIOs) are located only the top Option Button shows a dot selected the others appear blank even though the cells that they are linked to say TRUE and the formulas that are linked to the option buttons linked cells are working correctly, the problem is that the Option Buttons don’t appear to be selected when you look at the button, but they are.

    The fix so far, if I click on the Clear All Option Button and then Click on one of the Select all of Column they all have a dot selected in them. If I want to have all in another Column then selected I have to click the Clear All first and then the Select All (this Column) button which is a hassle but it’s a work around right now.

    This all worked when I had Form Control Check Boxes, but as I found out on the Check Boxes you could not Group them in Form Control and then you could also have multiple ones in the same row checked which would defeat my purpose of having only one option available per row, so as the last post pointed out to me use Option Buttons (RADIOs).

    Can anyone help, or did I babble too much and make it confusing? Oh I tried changing the Select All Column A to an ActiveX Command Button and put the code in via VBA, it does the same as the Form Control Button Macro, no change.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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