'WriteOnly' properties cannot have an access modifier on 'Set'

A WriteOnly property declaration specifies access levels in both the Property Statement and the Set Statement (Visual Basic).

You can always specify an access level for the property. In addition, you can specify a different access level for at most one of its property procedures (Get or Set), provided it is more restrictive than the property's access level. You cannot specify access levels for both of the property procedures.

Error ID: BC31104

To correct this error

  • Remove the access modifier from the Set statement. It represents the entire WriteOnly property, and you cannot have two access levels for the property.

See Also

Tasks

How to: Declare a Property with Mixed Access Levels

Concepts

Property Procedures