Skip to content

VBA223 — Property Set value parameter is scalar (use Let)

Severity: 🔴 error Category: property Phase: 2.3

Description

Property Set is for Object-typed RHS values. Scalar types use Property Let.

Failing example

Property Set Name(ByVal RHS As String): End Property

Compliant example

Property Let Name(ByVal RHS As String): End Property

How to fix

Rename the accessor to Property Let.


Source: src/rules.py — entry VBA223.