VBA165 — Invalid use of New keyword¶
Severity: 🔴 error Category: declaration Phase: 2.13
Description¶
New requires a creatable class; primitives, Object and Variant cannot be New-ed.
Failing example¶
Compliant example¶
How to fix¶
Use New only with a class type, or drop New for primitives.
Source: src/rules.py — entry VBA165.