Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error Checking | Excel Discussion (Misc queries) | |||
Error Checking | Excel Discussion (Misc queries) | |||
Excel Checkboxs, Optionbox | Excel Discussion (Misc queries) | |||
Error Checking | Excel Discussion (Misc queries) | |||
optionbox checkbox | Excel Discussion (Misc queries) |