Property without a 'ReadOnly' or 'WriteOnly' specifier must provide both a 'Get' and a 'Set'
If a property is not declared as ReadOnly or WriteOnly, it must supply procedures for reading and writing its value.
Error ID: BC30124
The error comes in the following example as ‘Set’ procedure is not available
Public Property MyTaskPane() As Microsoft.Office.Tools.CustomTaskPane
Get
Return oTaskPane
End Get
End Property
To correct
1. Make sure you include both a Get procedure and a Set procedure between the Property statement and the End Property statement.
2. Verify that other procedures within the Property declaration are correctly terminated.
In the above example, the TaskPane is not set and hence it can be a read-only property
Public ReadOnly Property MyTaskPane() As Microsoft.Office.Tools.CustomTaskPane
Get
Return oTaskPane
End Get
End Property
No comments:
Post a Comment