VBA182 — Deftype statement must precede declarations¶
Severity: 🔴 error Category: placement Phase: 3.7
Description¶
DefInt/DefStr/… statements must appear before any variable, constant, type or procedure declaration in the module.
Failing example¶
Compliant example¶
How to fix¶
Move the DefXxx statement to the top of the module, after Option but before any declaration.
Source: src/rules.py — entry VBA182.