Using a Select Case block

Each Case statement can have any number of statements beneath it. When the code executes, only those statements after the Case statement that matches the value at the top of the block execute. Figure 4-9 shows the general concept.

Select Case value

Case possibleValuel statements statements

These statements executed only if possibleValuel equals value.

Case possibleVahie2 statements statements

These statements executed only if possibleValue2 equals value.

Figure 4-9:

A Select Case block

Case possibleVahie3 statements statements

These statements executed only if possibleValue3 equals value.

Case Else runs only certain lines statements statements

These statements executed only if no possibleValue above equals value.

of code.

End Select

0 0

Post a comment