+ Reply to Thread
Results 1 to 2 of 2

Option Buttons -- editing and retrieving data

  1. #1
    Registered User
    Join Date
    07-25-2013
    Location
    Renton, WA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Option Buttons -- editing and retrieving data

    Hello ---
    I am rather desperate to receive help with Option Buttons using VBA.

    #1 -- Form Control Option Box
    I was not using these objects within a form, but rather in a worksheet. Perhaps that should not be done?

    I need about 50 sets of Option Boxes. My goal was to create 50 Form Control Group Boxes and place three Option Buttons within each Group Box . Once I linked the Group Box to a cell, it would provide values of 1, 2, or 3 depending which Option Button was selected. Fantastic!!!

    Also, I was able to to change the fill color of an Option Button. Using VBA, I could l look at each Option Button and determine which ones were colored.

    This seemed to go well, but after creating 7-8 Group Boxes with three Option Boxes inside, the Option Buttons were out of control, acting as if they were not confined by their Group Box. I was getting values greater than 3. This appears to be an obvious error, but I did this VERY CAREFULLY several times with the same frustrating results.

    #2 -- ActiveX Controls Option Box
    These are very different, but I am able to link the Option Button values to a cell and again determine which Option Button was selected.
    However, I need to discover the BackColor of each Option Button. How can I do this?

    Looking forward to your insights. Thank you!

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Option Buttons -- editing and retrieving data

    If the borders of your option buttons are not completely within their respective group box boarders, then they are not part of that group and the weirdness happens. An option button boarder cannot be at all outside its' groupbox.

    Here is example code that adds three option buttons within a groupbox to 50 rows in column B of a blank worksheet.

    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 03-10-2022 at 11:45 PM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ 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. enable certain combo buttons based on user selected option buttons
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-20-2013, 06:43 AM
  2. [SOLVED] Multiple option buttons - Need VBA to disable second group of option buttns based on respo
    By ex123 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-19-2013, 03:30 AM
  3. How can I insert multiple sets of option buttons (radio buttons) in Excel 2010?
    By mickwooduclan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-25-2013, 10:01 AM
  4. [SOLVED] Disabling an Entire Frame with Option Buttons if other Option Buttons are not clicked.
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-20-2012, 04:07 AM
  5. [SOLVED] option buttons for data table
    By alee001 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-08-2012, 10:09 AM
  6. Using option buttons to import data from Notepad
    By TallOne in forum Excel Programming / VBA / Macros
    Replies: 45
    Last Post: 02-29-2012, 05:03 PM
  7. Having option buttons fill in data conditionally
    By cowboy713 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-10-2010, 05:59 PM
  8. Gathering Data from Option Buttons
    By Susan in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-11-2006, 03:10 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