5.5.1.2.8 Let-coercion to and from a UDT

The semantics of UDT Let-coercion depend on the source’s value type and the destination’s declared type:

Source Value Type

Destination

Declared Type

Semantics

Any UDT

Same UDT as source type

The result is a shallow copy of the UDT. Elements with a value type of a class or Nothing are Set-assigned to the destination UDT field and all other elements are Let-assigned.

Any UDT

Any other type except Variant

Runtime error 13 (Type mismatch) is raised.

Any numeric type, Boolean, Date, String or array

Any UDT

Runtime error 13 (Type mismatch) is raised.