Part | Description | |
Optional | Optional. Indicates that the argument may or may not be supplied by the caller. | |
Public | Optional. Indicates that the Property Set procedure is accessible to all other procedures in all modules. If used in a module that contains an Option Private statement, the procedure is not available outside the project. | |
Private | Optional. Indicates that the Property Set procedure is accessible only to other procedures in the module where it is declared. | |
Static | Optional. Indicates that the Property Set procedure's local variables are preserved between calls. The Static attribute doesn't affect variables that are declared outside the Property Set procedure, even if they are used in the procedure. | |
name | Required. Name of the Property Set procedure; follows standard variable naming conventions, except that the name can be the same as a Property Get or Property Let procedure in the same module. | |
arglist | Required. List of variables representing arguments that are passed to the Property Set procedure when it is called. Multiple arguments are separated by commas. | |
reference | Required. Variable containing the object reference used on the right side of the object reference assignment. | |
statements | Optional. Any group of statements to be executed within the body of the Property procedure. |
Part | Description | |
Optional | Optional. Indicates that an argument is not required. If used, all subsequent arguments in arglist must also be optional and declared using the Optional keyword. Note that it is not possible for the right side of a Property Set expression to be Optional. | |
ByVal | Optional. Indicates that the argument is passed by value. | |
ByRef | Optional. Indicates that the argument is passed by reference. ByRef is the default in Visual Basic. | |
ParamArray | Optional. Used only as the last argument in arglist to indicate that the final argument is an Optional array of Variant elements. The ParamArray keyword allows you to provide an arbitrary number of arguments. It may not be used with ByVal, ByRef, or Optional. | |
varname | Required. Name of the variable representing the argument; follows standard variable naming conventions. | |
type | Optional. Data type of the argument passed to the procedure; may be Byte, Boolean, Integer, Long, Currency, Single, Double, Decimal (not currently supported), Date, String (variable length only), Object, Variant. If the parameter is not Optional, a user-defined type, or an object type may also be specified. | |
defaultvalue | Optional. Any constant or constant expression. Valid for Optional parameters only. If the type is an Object, an explicit default value can only be Nothing. |
' The Pen property may be set to different Pen implementations.
Property Set Pen(P As Object)
Set CurrentPen = P ' Assign Pen to object.
End Property