View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Patrick C. Simonds Patrick C. Simonds is offline
external usenet poster
 
Posts: 343
Default Test a grouping of OptionButtons

Thanks I figured it out

"Patrick C. Simonds" wrote in message
...
Is there any way to adjust that so that it checks each Group separately so
that I can display a different message for each group, so the user will
know which set of option buttons they need to look at?



"Joel" wrote in message
...
Try something like this

Sub test()

Set MyFrame = UserForm1.Frame1

Istrue = False
For Each but In MyFrame.Controls
If but.Value = True Then
Istrue = True
Exit For
End If
Next

If Istrue = False Then
MsgBox ("select a button in Frame 1")
End If

End Sub


"Patrick C. Simonds" wrote:

I have 4 OptionButton groups each group has a GroupName property set

Changed
Changed2
Changed3
Changed4

Is there any way to test a group and if all OptionButtons within that
group
are false to display a message telling the user that they must select
one of
the 6 options?