The Select Case...EndCase satement executes one of several groups of statements, depending on the value of an expression.
Select Case is similar to an If block but for more complex decisions where there are several possible answers. For example if you need to process different actions depending on which weekday it is, you will use a Select Case covering the 7 possible values for the current day.
Select Case <test_expression>
<test_expression>, numeric or string expression. If <test_expression> evaluates to one of the listed <expression_x>, the <statements> just after <expression_x> are executed.
Some possible <expression_x> are:
If <test_expression> does not evaluate to any of the <expression_x>, the <statements> after Case Else are executed.
Select Case day
msgbox("Hello, today is: "+aday$)