View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mathel mathel is offline
external usenet poster
 
Posts: 64
Default UserForm Option Button

I am new to UserForms (Excel 2003). I created a UserForm with 3 options that
input data into Cell A3 in a worksheet. However, you can exit the Userform
by clicking 'OK' without selecting any of the options. I need at least one
Option to be selected. I thought the following Code would help, but doesn't.
I am hoping someone can help.

Private Sub OK_Click()

If Range("A3") = " " Then
MsgBox "You Must Select the Source from this menu"
UserForm1.SetFocus

Exit Sub
End If

Unload Me

End Sub


Thanks
Linda