+ Reply to Thread
Results 1 to 12 of 12

Form & ActiveX Controls

  1. #1
    Forum Contributor
    Join Date
    07-02-2008
    Location
    Utah
    Posts
    171

    Form & ActiveX Controls

    Hi,

    I am writing a small questionnaire in Excel for employees to do a self-assessment. For each question, there are four possible answers (only one answer may be selected for each question). Is there a way to add radio buttons or check boxes for each answer such that a person can only select one answer (not check multiple boxes for the same question)?

    Thank you!!
    John
    Attached Files Attached Files
    Last edited by John Bates; 03-04-2011 at 04:03 PM. Reason: SOLVED

  2. #2
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,673

    Re: Form & ActiveX Controls

    I suggest Marlett checkboxes. Search the forum for many examples.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: Form & ActiveX Controls

    http://www.ozgrid.com/VBA/excel-checkbox-tick-cell.htm
    Here is a link that describes the use of the Marlett font to produce checkmarks
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

  4. #4
    Forum Contributor
    Join Date
    07-02-2008
    Location
    Utah
    Posts
    171

    Re: Form & ActiveX Controls

    Hi, Thank you for the help. I've added the VBA code for a Marlett Check Box, I cannot seem to get it only allow a single selection within the range of cells (only 1 answer). Also, how do I add multiple ranges (e.g., Range("E12:E15"), Range ("E20:E24"))

    Thanks!

  5. #5
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: Form & ActiveX Controls

    Quote Originally Posted by John Bates View Post
    Also, how do I add multiple ranges (e.g., Range("E12:E15"), Range ("E20:E24"))

    Thanks!
    I can answer part of this....

    use this line:

    Please Login or Register  to view this content.

  6. #6
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,673

    Re: Form & ActiveX Controls

    You will need to loop through each of the areas in your multi-area range in order to make them behave like option buttons (i.e., only one active in a given area).

    Post the code you're using.

  7. #7
    Forum Contributor
    Join Date
    07-02-2008
    Location
    Utah
    Posts
    171

    Re: Form & ActiveX Controls

    Perfect! Thank you for all your help!!

  8. #8
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: Form & ActiveX Controls

    I'd love to see how you looped through the ranges, if you are willing to share.

  9. #9
    Forum Contributor
    Join Date
    07-02-2008
    Location
    Utah
    Posts
    171

    Re: Form & ActiveX Controls

    Sure thing. Here is the code that I ended up using. "Chkboxes" is a named range of the list of cells where the check boxes reside.
    Please Login or Register  to view this content.
    Last edited by John Bates; 03-04-2011 at 05:33 PM.

  10. #10
    Forum Contributor
    Join Date
    07-02-2008
    Location
    Utah
    Posts
    171

    Re: Form & ActiveX Controls

    I've never added CODE tags...how do I do that?

  11. #11
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,673

    Re: Form & ActiveX Controls

    You can use this and skip the Worksheet_Change event.
    Please Login or Register  to view this content.
    I've never added CODE tags...how do I do that?
    Explained in the forum rules.
    Last edited by shg; 03-04-2011 at 05:34 PM.

  12. #12
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: Form & ActiveX Controls

    Hey Thanks guys!...I will study the code provided a little closer and see what all you did there.

+ 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