Skip to content

VBA224 — Property Let value parameter is object (use Set)

Severity: 🔴 error Category: property Phase: 2.3

Description

Property Let is for scalar RHS values. Object types use Property Set.

Failing example

Property Let Item(ByVal RHS As Object): End Property

Compliant example

Property Set Item(ByVal RHS As Object): End Property

How to fix

Rename the accessor to Property Set.


Source: src/rules.py — entry VBA224.