Under the hood, aClassInstance.publicVariable encapsulated as a hidden get / let pair property, so ByRef passes the address of the property of hidden get properties, not the base variable declared in the class.
You can verify this by examining the addresses of two forms d inside the class; they will be different
(class_init) debug.? " d address=" & VarPtr(d) debug.? ".d address=" & VarPtr(me.d)
source share