ELSE
Action

Executed if the IF-THEN expression is false.

Syntax

ELSE

Remarks

You don't have to use the ELSE statement in an IF THEN .. END IF structure.

You can use the ELSEIF statement to test for another condition.

IF a = 1 THEN

...

ELSEIF a = 2 THEN

..

ELSEIF b1 > a THEN

...

ELSE

...

END IF

See also
IF , END IF SELECT CASE

Example


A = 10 'let a = 10
IF A > 10 THEN 'make a decision
PRINT " A >10" 'this will not be printed
ELSE 'alternative
PRINT " A not greater than 10" 'this will be printed
END IF