Collection Property
Applies To
CodePane object, Property object, Reference object, VBComponent object, VBProject object, Window object.
Description
Returns the collection that contains the object you are working with. Read-only.
Remarks
Most objects in this object model have either a Parent property or a Collection property that points to the object's parent object.
Use the Collection property to access the properties, methods, and controls of the collection to which the object belongs.
See Also
Parent property.
Example
The following example uses the Collection and Count properties to return the number of objects the active project contains, when viewed as a collection of objects.
Debug.Print Application.VBE.ActiveVBProject.Collection.Count