If Statement

If boolean_expression_1
   [code_block_1]
[Else If boolean_expression_n
   [code_block_n] ]
[Else
   [code_block_else] ]
End If

If boolean_expression_1 evaluates to TRUE then code_block_1 is executed and then the program continues after the End If.

If boolean_expression_1 evaluates to FALSE then if there are any boolean_expression_n they are evaluated in the order they appear, if one of them evaluates to TRUE then the corresponding code_block_n is executed and then the program continues after the End If.

If neither boolean_expression_1 nor any of the boolean_expression_n evaluate to TRUE then code_block_else is executed (if there is an Else block).