Table of Contents

VBC00052 — End With without With

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

An End With statement ends no With block.

An End With statement ends the With block it is written in: where none is open, there is no block 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
An End With with no With. End With alone in a procedure Remove it, or write the With it ends.

See also


⏮️ VBC00051 Select Case without End Select | ⏭️ VBC00053 Expected End With


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