Common Properties and Methods

Most of the objects in the VBE object library have the following common properties. To avoid redundancy, these properties will be listed for each object, but will not be explained.

Name Returns Description

Collection Read-only. Returns the collection to which an object belongs. For example, a Reference object belongs to the References collection. The Collection property is used for objects that belong to collections.

Collection Read-only. Returns the collection to which an object belongs. For example, a Reference object belongs to the References collection. The Collection property is used for objects that belong to collections.

Parent

Read-only. Returns the object to which an object belongs. For example, a References collection belongs to a VBProject object. The Parent property is used for objects that do not belong to collections.

VBE

VBE

Read-only. Returns the Visual Basic Editor object, which is analogous to the Application object in the Excel object model.

Most of the objects in the VBE object model are contained in associated collections. The collection object is usually the plural form of the associated object. For example, the Windows collection holds a collection of Window objects. For simplicity, each object and associated collection are grouped together under the same heading. The common properties and methods of the collection objects are the same as in the Excel object model, and are listed in Appendix A. Only unique properties, methods, or events are mentioned for each object.

0 0

Post a comment