Skip to content

VBA112 — While without Wend

Severity: 🔴 error Category: syntax Phase: 1.5

Description

A While block has no matching Wend.

Failing example

While x < 10
    x = x + 1

Compliant example

While x < 10
    x = x + 1
Wend

How to fix

Add the Wend that closes the While.


Source: src/rules.py — entry VBA112.