Export (0) Print
Expand All

Creating Object Properties

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The Property Set procedure behaves the same as the Property Let procedure, except that you use it to assign an object reference to an object property. You can then use a corresponding Property Get procedure to return the object reference.

There are a couple of cases in which it is useful to create an object property. When you want to create a new object that provides all the properties, methods, and events of an existing object, plus additional ones that you have defined, you can create an object property that returns a reference to the existing object. In addition, when you create an object model that has a hierarchy — the object contains other objects or collections — you must create an object property to access a lower-level object in the hierarchy.

See Also

Why Build Your Own Objects? | Wrapping a Built-in Object | Accessing Objects in a Custom Object Model | Basic Class Concepts | Creating Property Procedures | Creating Events and Event Procedures | Extending Objects Through Interfaces | Designing Object Models | Creating Custom Objects for Web Pages

Show:
© 2015 Microsoft