Table of Contents

VBC00045 — Loop without Do

Severity: Error  ·  Family: VBC (parser / concrete syntax tree)  ·  Source metadata: VBSyntaxErrorInfo

A Loop statement ends no Do loop.

A Loop statement ends the Do loop it is written in: where none is open, there is no loop for it to end.

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 Loop with no Do. Loop alone in a procedure Remove it, or write the Do statement it ends.

See also


⏮️ VBC00044 For without Next | ⏭️ VBC00046 Do without Loop


ACCUEIL • HOME | ℹ️ BIENVENUE • WELCOME | 🧩 BÂTISSONS • BUILD | RD-VBAL | SDK | 🌐 rubberduckvba.ca