Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with Or statement
Can someone tell me how I can shorten the below "Or" statement without
repeating the entire string? If (frmMaintest.CBox1.Text = "bob") Or (frmMaintest.CBox1.Text = "george") Or (frmMaintest.CBox1.Text = "kevin") Then MsgBox "You must select another name!" Exit Sub ElseIf (frmMaintest.CBox1.Text = "john") Or (frmMaintest.CBox1.Text = "tom") Then MsgBox "This name is acceptable!" End If |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF statement inside a SUMIF statement.... or alternative method | Excel Worksheet Functions | |||
Reconcile Bank statement & Credit card statement & accounting data | Excel Worksheet Functions | |||
Embedding an OR statement in an IF statement efficiently | Excel Discussion (Misc queries) | |||
Can an If statement answer an If statement? | Excel Discussion (Misc queries) | |||
appending and IF statement to an existing IF statement | Excel Worksheet Functions |