Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
optionbutton
What code would I use to return which optionbutton within a given frame is
checked (true)? I've tried using a for each loop but I can't figure out the correct collection to use. I'm new to userforms (if that's not already obvious). Thanks for the help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
optionbutton
Dim ctrl as Control
Dim oBtn as MSForms.OptionButton for each ctrl in Userform.Frame1.controls if type of ctrl is MSForms.OptionButton then if ctrl.Value = true then msgbox ctrl.name set oBtn = ctrl exit for End if end if Next -- Regards, Tom Ogilvy "benb" wrote in message ... What code would I use to return which optionbutton within a given frame is checked (true)? I've tried using a for each loop but I can't figure out the correct collection to use. I'm new to userforms (if that's not already obvious). Thanks for the help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
OptionButton value | Excel Programming | |||
OptionButton | Excel Programming | |||
OptionButton | Excel Programming | |||
Better Way to Use OptionButton | Excel Programming | |||
Better Way to Use OptionButton | Excel Programming |