GoTo Case Statement

Causes a Select statement to be re-evaluated with a different expression.

Syntax

GoTo Case expression [ Tol tolerance ]
or
GoTo Case Else

Parts

expression
Required unless Else is used. An expression with a data type compatible with the test expression in the Select clause.
tolerance
Optional. See Tol Clause for more details.
Else
Required unless expression is used.

Remarks

The GoTo Case statement typically causes the Select block to re-execute, replacing the original test expression with a different one. Each Case clause is re-evaluated, using the usual rules, until a match is found.

If no Case expression matches, or you use the form GoTo Case Else, execution transfers to the Case Else, if one exists, or to the statement following the End Select clause otherwise.

Examples

See also