Conditionally execute a block of statements depending on the value of an expression
Syntax:
If condition Then [statements] [Else else statements] End If
| condition | Required. A test condition |
| statements | Optional. A block of statements to be executed when the condition is True |
| else statements | Optional. A block of statements to be executed when the condition is False |
Example:
If a>b And c<d Then x=1 Else x=2 End If
Also See: