Collapse the table of content
Expand the table of content
Expand Minimize

Calling Property Procedures

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

The following table lists the syntax for calling property procedures:

Property Procedure

Syntax

Property Let

[object.]propname(arguments)] = argument

Property Get

varname = [object.]propname(arguments)]

Property Set

Set [object.]propname[.(arguments)] = varname

When you call a Property Let or Property Set procedure, one argument always appears on the right side of the equal sign (=).

When you declare a Property Let or Property Set procedure with multiple arguments, Visual Basic passes the argument on the right side of the call to the last argument in the Property Let or Property Set declaration. For example, the following diagram shows how arguments in the Property procedure call relate to arguments in the Property Let declaration:

abhlp002_ZA01201812

In practice, the only use for property procedures with multiple arguments is to create arrays of properties.

Show:
© 2016 Microsoft