April 2001
Beginner
432 pages
10h 27m
English
The Select Case statement is better suited to checking for multiple conditions than is If, even when utilizing the logical operators. The use of more than three or four embedded If...Else statements results in a complicated program. You get into messy logic such as "If this is true, then if this is true, then if one more thing is true, then do something, otherwise…" Here is the Select Case statement's format:
Select Case Expression Case expressionMatch Block of one or more Visual Basic statements [ Case expressionMatch1 Block of one or more Visual Basic statements] [ Case expressionMatch2 Block of one or more Visual Basic statements] : [ Case expressionMatchN Block of one or more Visual Basic statements] [Case Else ...
Read now
Unlock full access