IF statement

Top  Previous  Next

If condition Then

   [ statements ]

ElseIf elseifcondition Then

   elseifstatements ]

Else

   elsestatements ]

End If

 

' -or-

 

If condition Then statement [ Else elsestatement ]

 

Conditionally executes a group of statements, depending on the value of an expression.

 

Example:

If Trim(sMemWeb) = "" Then

   iStatusCode = 2

   sStatusMessage = "Error processing Plugin"

ElseIf sMemWeb <> sMemLocal Then

   iStatusCode = 1

   sStatusMessage = "Plugin processed"

Else

   sStatusMessage = "Plugin processed"

End If




Translate document: