View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Owen[_5_] Owen[_5_] is offline
external usenet poster
 
Posts: 2
Default validate an option is chosen


You can validate the values by nesting IF Statements at
the beginning of your code...

HTH
Owen

If Sheet1.OptionButton1 = Sheet1.OptionButton2 Then
If Sheet1.OptionButton2 = False Then
Dim lMsg As Long
lMsg = MsgBox("Select an Option Fool", vbOKOnly +
vbExclamation, "No Selection Made")
End If
End If


-----Original Message-----
I have 2 option buttons in a form. The worksheet is
emailed with a macro. How can I validate in my macro that
one of the option buttons has been selected. In other
words I would like a message box to pop up saying "You
must make a selection before emailing" if the user does
not select one of the option buttons.

thanks
.