What's the purpose of `Case` with VBA's `Select` statement?

VBA has a Select statement that chooses which code to run based on a value (much like switch in C-style languages). The syntax for this statement looks like:

Select Case x
    Case 1
        'do one thing
    Case 2
        'do a different thing
End Select

What is the purpose of the Case right after Select? Alternatively, what is the meaning of Select without Case?

Answers


There is no such thing as a Select statement in VBA. There is a Select Case statement.

Therefore, strictly speaking, the answers to your questions are: There is none, and there is none.

It's a bit like asking what is the meaning of Pri without nt and vice-versa... There is no particularly exciting answer to that question.


Need Your Help

Export Flash as Transparent MOV

wpf flash video

Is it possible to export a flash movie with a transparent background as a .MOV.