VBC00051 — Select Case without End Select
Severity: Error · Family: VBC (parser / concrete syntax tree) ·
Source metadata: VBSyntaxErrorInfo
A Select Case statement is not ended before its procedure is.
A Select Case statement is ended by an End Select statement in the same procedure.
MS-VBA reports the same error, with the same message (recorded in Excel).
This code is raised by the parser, at the statement that does not fit, when the grammar refuses a procedure whose blocks do not match. RD-VBA reports it for every procedure; MS-VBA stops at the first.
How it is raised
| Situation | Example | Resolution |
|---|---|---|
A Select Case with no End Select. |
Select Case x … Case 1 … End Sub |
Write End Select where the statement ends. |
See also
⏮️ VBC00050 Case without Select Case | ⏭️ VBC00052 End With without With
ACCUEIL • HOME | ℹ️ BIENVENUE • WELCOME | 🧩 BÂTISSONS • BUILD | RD-VBAL | SDK | 🌐 rubberduckvba.ca