Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default OptionBox error checking

I am at a loss here. My first 5 lines of code work fine but I need code
which checks to see that If TextBox1 is not blank, and neither OptionButton4
or OptionButton5 are selected (both False) then the message box will come
telling you that you must select one or the other


If OptionButton4.Value = True Then
rng(1, 6).Value = "Yes"
ElseIf OptionButton5.Value = True Then
rng(1, 6).Value = "No"
End If

If TextBox1.Text < "" And OptionButton4.Value = False And
OptionButto5.Value = False Then
MsgBox "Input Incomplete - You must select either " & _
"Yes or No for Route 1"
GoTo EndMacro
End If


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default OptionBox error checking


Good morning Patrick Simmonds

You'll kick yourself - really, you will :

change < for =.

thus:

If TextBox1.Text = "" And OptionButton4.Value = False An
OptionButton5.Value = False Then

HTH

Dominic

--
dominic
-----------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...fo&userid=1893
View this thread: http://www.excelforum.com/showthread.php?threadid=47166

Reply
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
Error Checking SammyB Excel Discussion (Misc queries) 2 June 4th 07 10:48 AM
Error Checking Lost in Microbiology Excel Discussion (Misc queries) 8 May 11th 07 05:36 AM
Excel Checkboxs, Optionbox Brandon Excel Discussion (Misc queries) 1 January 19th 07 08:25 PM
Error Checking mworth01 Excel Discussion (Misc queries) 1 May 18th 06 08:45 PM
optionbox checkbox flow23 Excel Discussion (Misc queries) 3 November 24th 05 01:00 PM


All times are GMT +1. The time now is 02:23 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"