+ Reply to Thread
Results 1 to 12 of 12

How to select more than one activeX radio button?

  1. #1
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    134

    How to select more than one activeX radio button?

    I have a spreadsheet that asks 20 Yes, No or N/A questions. I added radio active x controls for each yes, no or n/a answer, but I am can only select one for all the questions, not one for each question. Does anyone know how to fix that? TIA!

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: How to select more than one activeX radio button?

    Can you attach a sample workbook with your radioactive ActiveX controls?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    134

    Re: How to select more than one activeX radio button?

    Here it is, I hope.
    Attached Files Attached Files

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: How to select more than one activeX radio button?

    On each row right click one of the option buttons and select Properties...

    You should now see the Property sheet for that button.

    Select the other option buttons in the row by holding down CTRL and left clicking.

    Set the GroupName property of the selected buttons to something appropriate.

    Repeat for the other rows of buttons, giving each set a unique GroupName.

  5. #5
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    134

    Re: How to select more than one activeX radio button?

    I did that, but now I get a Run-Time error '9': subscript out of range. My coding isn't working now. What I am trying to accomplish is. A user has to answer these questions. If at any point they select no, I want the pass to change to fail and turn red, then they know that they can not go any further. Well they can go ahead and complete the form, but they need to fix the errors that show up as failed.

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: How to select more than one activeX radio button?

    Triscia

    You never mentioned any code.

    I've looked a the code and the change I suggested should have no impact on it.

    Where does it fail and under what circumstances?

  7. #7
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    134

    Re: How to select more than one activeX radio button?

    If the user selects No on any question, it will read FAIL

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: How to select more than one activeX radio button?

    I thought the error was 'Subscript out of Range'?

  9. #9
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    134

    Re: How to select more than one activeX radio button?

    That is the error when I try to select the q2 button. I get that error and then cell c20 doesn't change to fail because I selected No for q2.

  10. #10
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: How to select more than one activeX radio button?

    Which line of code does it fail on?

    Also which button is the q2 button? The questions aren't numbered.

  11. #11
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    134

    Re: How to select more than one activeX radio button?

    I figured it out. I actually copied the code from another workbook and I needed to change the name of the sheet in the code. Our tabs were named different, so that was the issue. I believe that I have it now. Thank you for all of your help. I love this forum. It helps so much. Thanks again.

  12. #12
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    You could avoid the error by replacing ActiveSheet with Me and not using Sheets("Sheet1").Activate.

    Me refers to the worksheet the buttons are on.

+ 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