LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default code to check OptionButton selected within multiple frames

Hi Guys,

I am a total newbie to this and the group has been really helpful in
learning so far!

I am setting up a UserForm that has multiple frames containing
different OptionButtons.

When the OK button is clicked I want it to be coded to check that each
frame has an OptionButton Selected. Is it possible to write this code
referring to the frame (i.e. group of OptionButtons) or do I have to
write the code including each individual OptionButton like below:

If Me.OptionButton1.Value = False And Me.OptionButton2.Value = False
And _
Me.OptionButton3.Value = False And Me.OptionButton4.Value = False
Then
MsgBox " you must select a squad ", vbExclamation, "Input
Error"
Exit Sub
End If

I have 20 option buttons in one frame so just wondering if there is a
shorter way to write the code?

Thanks in advance
Paul
 
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
VBA syntax to check between two time frames i.e. 2 PM thru 5 AM? lwchapman Excel Programming 2 February 13th 08 08:26 PM
check ocontrols within frames within userform Susan Excel Programming 7 March 19th 07 08:01 PM
Check if a optionbutton is selected Gert-Jan[_2_] Excel Programming 9 December 22nd 06 06:47 AM
OptionButton Check Information Hog[_7_] Excel Programming 0 August 23rd 05 05:53 PM
Multiple Frames on a userform James McDowell[_2_] Excel Programming 3 May 3rd 05 05:20 AM


All times are GMT +1. The time now is 10:49 PM.

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

About Us

"It's about Microsoft Excel"