Results 1 to 11 of 11
  1. #1
    3 Star Lounger
    Join Date
    Jun 2002
    Location
    Duluth, Minnesota, USA
    Posts
    215
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Radio Buttons (2K SR-1)

    Is there a way for one set of radio buttons to define the choices available in a second set? In my case, the first four radio buttons would allow the selection of one out of four products. The second set of buttons would allow the selection of one parameter out of several specific to the product selected in the first group of radio buttons. For example, if group one allowed the selection of Product A, Product B, or Product C and the second group of buttons was used to select color options that were different for each product, could this be set up so that the selection in group one defined the choices seen in group two?

    Am I making sense? The choices available in group two would change depending on what was chosen in group one.

    TIA, Douglas

  2. #2
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Radio Buttons (2K SR-1)

    Have you considered using "Indirect Range Names". I have attached a sample Excel file that depicts the use of indirect range names. I'm sure with effort you can attach the code from a combobox to a button.

    John

  3. #3
    2 Star Lounger
    Join Date
    Dec 2000
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Radio Buttons (2K SR-1)

    Assuming you have:
    a user form called Userform1
    a group of radio buttons for your products
    another group of radio button called Red, Blue, Green and White

    Then in the click event for each of the product buttons in group one you would put this code:

    UserForm1.red.Enabled = True
    UserForm1.blue.Enabled = False
    UserForm1.Green.Enabled = True
    UserForm1.White.Enabled = False

    changing the true or false depending on whether you want to enable or disable the color choice for that particular product.

  4. #4
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Dallas plus 20 miles or so, Texas, USA
    Posts
    876
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Radio Buttons (2K SR-1)

    As a further thought in addition to the other suggestions, you might also change the captions on the buttons you wish to enable, and perform actions based on whatever caption of the button is at the time...i.e. click button1 and button6 changes caption, color, whatever. In the click event for button6 you could use an if statement to decide what else you want to do depending on the caption of the button (or another property of the button for that matter).

  5. #5
    3 Star Lounger
    Join Date
    Jun 2002
    Location
    Duluth, Minnesota, USA
    Posts
    215
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Radio Buttons (2K SR-1)

    You got me on the "user form". I was just trying to set this up with in a plain ol' spreadsheet.

    What am I missing?

    Douglas

  6. #6
    3 Star Lounger
    Join Date
    Jun 2002
    Location
    Duluth, Minnesota, USA
    Posts
    215
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Radio Buttons (2K SR-1)

    This is exactly what I hoped to do. How to go about it is the question. Fraid I need a bit more coaching.

    Douglas

  7. #7
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Dallas plus 20 miles or so, Texas, USA
    Posts
    876
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Radio Buttons (2K SR-1)

    Douglas, here is a simple example that might help get you started. HTH.

  8. #8
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Dallas plus 20 miles or so, Texas, USA
    Posts
    876
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Radio Buttons (2K SR-1)

    Forgot to mention I did not use option buttons, but you could change as you wish. At some point you might find it better to use a combobox or listbox if you are going to have lots of choices, but populating them is a little more complex that using buttons.

  9. #9
    2 Star Lounger
    Join Date
    Dec 2000
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Radio Buttons (2K SR-1)

    Yet another example.

  10. #10
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Radio Buttons (2K SR-1)

    Here is an example with PULLDOWNS.
    Some advantages:
    NO VB code, so NO macro warning
    Lists can be different lengths and listbox is automatically adjusted to ONLy have items for that list

    Steve

  11. #11
    3 Star Lounger
    Join Date
    May 2002
    Location
    Mpls, Minnesota, USA
    Posts
    271
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Radio Buttons (2K SR-1)

    WOW
    I really love the forum!

    Chuck
    Chuck Reimer
    I'm from the Government and I'm here to help...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •