If conditional Then statement
Allows conditional statements to be executed in the code.
Syntax 1
If condition Then thenpart [Else elsepart]
Syntax 2
If condition Then
[statement(s)]
ElseIf condition Then
[statement(s)]
Else
[statements(s)].
End If
More: