want ot use for my business

P

prasad3586

Hi,

I was wondering if i can use if else or switch sort of things as we
can do in c or c++ or like in java,
I have seen only like if but what hapen when we will be having more
then 3 conditions which can be checkes at a time and need to be done
few calculations.

I hope i can get help


Thank You
 
B

Bob Phillips

In VBA You can use

If condition1 Then
'do something
ElseIf condition2 Then
'do something else
ElseIf '...
' 'etc
EndIf

or a Case Structure

Select Case True
Case object = value1: 'do something
Case object = value:2 'do something else
'etc.
Case Else: '...
End Select

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)
 
Top