Name

Switch Function — Microsoft.VisualBasic.Interaction

Synopsis

Switch(expr-1, value-1[, expr-2, value-2 ... [, _
       expr-n,value-n]])
expr required; Object

A number of expressions to be evaluated

value required; Object

An expression or value to return if the associated expression evaluates to True

Return Value

An Object value or expression

Description

Evaluates a list of expressions and, on finding the first expression to evaluate to True, returns an associated value or expression.

If none of the expressions is True, the Switch function returns Nothing.

If multiple expressions are True, Switch returns the value that corresponds to the first True expression.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset