Option Buttons

  • Thread starter Thread starter Dayton
  • Start date Start date
D

Dayton

How do I make sure that one of my two buttons have been selected before the
rest of my code exectues.


If OptionButton1 "NOT SELECTED" and OptionButton2 "NOT SELECTED" then
MsgBox "Make Selction".....
Else
'Execute statements

End If
 
If OptionButton1 = True Or OptionButton2 = True Then
'Execute statements
Else
MsgBox "Make a selection"
End If
 
Dayton,

If this is on a form, disable the comand button that executes "the rest of
your code". When an option button is clicked, enable the command button.
Please note, the command button may lose it's "Default" status as a result.

Dale Preuss
 
If Not OptionButton1.Value and Not OptionButton2.Value then
MsgBox "Make Selction".....
Else
'Execute statements
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top