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: 44
Default verify state of option button

I have a group of four option buttons on a userform. The user is
required to check select one of them. What can I put in my code to
verify this. What I currently have is below but it does not seem like
it is the most efficient way of completing this task as I have this
occurrence 34 separate times.


sub verify()
If opt1.Value = False And opt2.Value = False And opt3.Value = False
And opt4.Value = False Then
GoTo 2:
ElseIf opt5.Value = False And opt6.Value = False And opt7.Value =
False And opt8.Value = False Then
GoTo 2
end if

'other code below
....
exit sub
2: msgbox "Please verify that you have completed each section"
end sub

 
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
need help on how to grey out one option button in one group box based on the selection of another option button in another group box George Excel Programming 12 March 11th 07 02:08 PM
Triple state command button John Davies Excel Programming 1 September 8th 06 10:00 AM
Mouse-Over State on Graphic Button TheVisionThing Excel Programming 6 November 18th 05 05:17 AM
triple state option buttons Ken Macksey Excel Programming 0 April 13th 05 06:23 PM
state of option button crapit Excel Programming 12 June 3rd 04 10:15 AM


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

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"