Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Embedded Optionbuttons
Hey
I have 3 option buttons. Heres how I want them to work together. I want Optionbutton1 to have 2 other optionbuttons under it(Optionbutton2 and Optionbutton3). I want those 2 optionbuttons to be associated with each other to where when I click on Optionbutton1 I have the option to click on Optionbutton2 and Optionbutton3. If I click on Optionbutton2 then I still want Optionbutton1 to be bulleted but not optionbutton3, and if I click on Optionbutton3, I want Optionbutton2 to NOT be bulleted but Optionbutton1 to still be bulleted. How do I do this? Right now my problem is they are all connected. Thanks Todd Huttenstine |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Embedded Optionbuttons
Create a frame. Put two option buttons in it. Call these buttons 1
and 4. Make sure they are sufficiently spaced apart. Nest a second frame just below the first option button and completely *within* the first frame. Put 2 option buttons in this frame. Call them buttons 2 and 3. Now, when you select one of the first 2 option buttons (1 or 4) XL/VBA will toggle between those two. The same applies to the nested buttons which will operate as an either-or pair. To enable the nested pair only when button 1 is selected you will need code. Option Explicit Sub setNestedState() With Me .OptionButton2.Enabled = .OptionButton1.Value .OptionButton3.Enabled = .OptionButton1.Value End With End Sub Private Sub OptionButton1_Click() setNestedState End Sub Private Sub OptionButton4_Click() setNestedState End Sub -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article , says... Hey I have 3 option buttons. Heres how I want them to work together. I want Optionbutton1 to have 2 other optionbuttons under it(Optionbutton2 and Optionbutton3). I want those 2 optionbuttons to be associated with each other to where when I click on Optionbutton1 I have the option to click on Optionbutton2 and Optionbutton3. If I click on Optionbutton2 then I still want Optionbutton1 to be bulleted but not optionbutton3, and if I click on Optionbutton3, I want Optionbutton2 to NOT be bulleted but Optionbutton1 to still be bulleted. How do I do this? Right now my problem is they are all connected. Thanks Todd Huttenstine |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
UserForm OptionButtons | Excel Discussion (Misc queries) | |||
Array of OptionButtons ? | Excel Programming | |||
OptionButtons | Excel Programming | |||
Add OptionButtons in Excel | Excel Programming | |||
optionbuttons | Excel Programming |