Skip to content

VBA164 — Invalid use of Me keyword

Severity: 🔴 error Category: assignment Phase: 2.13

Description

Me refers to the current instance and cannot be assigned to.

Failing example

Set Me = Nothing

Compliant example

Set obj = Me

How to fix

Use a regular object variable as the assignment target.


Source: src/rules.py — entry VBA164.