select-case (2)
select-case (2)
Syntax
Select [ Case ] expression
[ Case expressionlist
[ statements ] ]
[ Case Else
[ elsestatements ] ]
End Select
Where:
•expression: Represents an expression that must
evaluate to any of the data types (selector)
•expressionlist: Denotes a list of expression clauses
representing match values for the expression. Multiple
expression clauses are separated by commas.
•statements: Refers to the statements
following Case that run if the select expression
matches any clause in the expressionlist.
•Case Else: Represents the block of one or more VB
statements to be executed if the select expression
does not match any of the specified cases.
•expressionlist: Each clause can take one of the
following forms:
- expression1 To expression2
- [ Is ] comparisonoperator expression
- expression