Skip to content

VBA117 — Loop without Do

Severity: 🔴 error Category: syntax Phase: 1.5

Description

A Loop appears with no Do block open in scope.

Failing example

    x = x + 1
Loop

Compliant example

Do
    x = x + 1
Loop While x < 10

How to fix

Remove the stray Loop or add the opening Do.


Source: src/rules.py — entry VBA117.