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: 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
 
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
Retain value of userform option button Gig[_2_] Excel Programming 4 March 14th 09 06:50 PM
Populate userform combobox with option button Gig[_2_] Excel Programming 3 March 12th 09 06:05 PM
option button and userform question Shawn Excel Programming 1 June 29th 07 12:51 AM
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
keep source formatting is not an option in paste option button Tina Excel Discussion (Misc queries) 0 February 20th 06 09:58 PM


All times are GMT +1. The time now is 02:31 AM.

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"