Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 260
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UserForm OptionButtons Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 3 October 4th 07 07:52 PM
Array of OptionButtons ? MWE[_37_] Excel Programming 3 April 21st 04 03:16 AM
OptionButtons Paul Excel Programming 4 December 4th 03 04:12 PM
Add OptionButtons in Excel Andrew Lenczycki Excel Programming 0 July 30th 03 02:34 PM
optionbuttons Phil Perry Excel Programming 1 July 10th 03 09:13 PM


All times are GMT +1. The time now is 02:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"