5.5.2.2.2 Set-coercion to and from non-object types

The semantics of non-object Set-coercion with the Set keyword depend on the source’s value type and the destination’s declared type:

Source Value Type

Destination

Declared Type

Semantics

Any type except a class or Nothing

Any class or Object

Runtime error 424 (Object required) is raised.

Any type except a class or Nothing

Variant

Runtime error 13 (Type mismatch) is raised.