Edit

Share via


'<propertyname>' cannot be exposed to COM as a property 'Let'

'<propertyname>' cannot be exposed to COM as a property 'Let'. You will not be able to assign non-object values (such as numbers or strings) to this property from Visual Basic 6.0 using a 'Let' statement.

A class using a COMClassAttribute attribute block declares a Public property with data type Object. A Visual Basic 6.0 program can access this property as a Variant, but can assign only an object reference to it with the Set statement. It cannot assign a value type with the Let statement.

By default, this message is a warning. For more information on hiding warnings or treating warnings as errors, see Configuring Warnings in Visual Basic.

Error ID: BC42102

To address this warning

  • Consider informing potential Visual Basic 6.0 users of this class that they cannot use this property with the Let statement.

See also