Select ... Case

Conditionally execute a block of statements.
Syntax
Select Case TestExpression
[Case ExpressionList
[Statements-n]]...
[Case Else
[ElseStatements]]
End Select

Key
TestExpression A numeric or String expression which will
determine which block of code is executed

ExpressionList Comma delimited list of expressions to compare/
match against TestExpression

Statements-n Statements to execute if a match is found.

ElseStatements Statements to execute if a match is not found.

Example
strPerson="Jasper"

select case strPerson
case "Alex"
WScript.Echo "We found Alex"
case "Jasper"
WScript.Echo "We found Jasper"
case "Helen"
WScript.Echo "We found Helen"
end select  

Make a Free Website with Yola.