Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 320
Default 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
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
TEST Why does my questions not appear in group? Leon[_2_] Excel Discussion (Misc queries) 2 June 11th 09 03:01 PM
Test for Shape is part of a group? Brett Excel Programming 1 May 20th 09 02:36 PM
test for next group doesn't work on the last one Janis Excel Programming 1 October 5th 07 08:15 AM
Calculate mean of test scores from rows of test answers RiotLoadTime Excel Discussion (Misc queries) 1 July 26th 06 05:14 PM
which optionbutton is on Keyur Excel Programming 1 July 25th 04 05:49 AM


All times are GMT +1. The time now is 01:49 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"