Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Optionbutton Group test
Private Sub Commandbutton1_Click()
Dim x As Control For Each x In Me.Controls If TypeName(x) = "OptionButton" Then If x.Value = True Then GoTo OK Next MsgBox "none" Exit Sub OK: MsgBox "good" End Sub "Patrick C. Simonds" wrote in message ... I have 7 OptionButtons on my UserForm. They are all have the same GoupName, which is Status. Is there any way to test the Group to ensure at least 1 option is selected. What I am looking for is a msgbox to popup saying "You must select at least 1 option prior to continuing" I know I can use an If Statement to check each OptionButton but thought it would be cleaner if I could just check the Group. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
TEST Why does my questions not appear in group? | Excel Discussion (Misc queries) | |||
Test for Shape is part of a group? | Excel Programming | |||
test for next group doesn't work on the last one | Excel Programming | |||
Calculate mean of test scores from rows of test answers | Excel Discussion (Misc queries) | |||
which optionbutton is on | Excel Programming |