VBA370 — Constant/array/Declare as Public member of object module¶
Severity: 🔴 error Category: placement Phase: 3.10
Description¶
Constants, arrays and Declare statements cannot be Public members of an object module (Class / Form). They are only legal in standard modules, or as Private members.
Failing example¶
Compliant example¶
How to fix¶
Move it to a standard module, or mark it Private and expose it via a Property Get.
Source: src/rules.py — entry VBA370.