Parents and Children The Object Model Hierarchy

An object model is a system of objects that provides a programmatic model for interacting with an application. Object models in VBA are represented in a hierarchical "tree" fashion with the Application object (the object representing the program itself) as the root. All other objects and collections are children of the root object.

- Resource

Task

In Microsoft Project, for example, collections such as the Windows, Projects, and Tables collections—as well as the Cell and Selection objects (and others)—are child objects of the Application object. For each of those child objects, then, the Application object is not only the root of the object model, but the parent object.

Other than the Application object, which has no parent, every object and collection has a parent object. Objects usually have child objects (the Project object has Resources and Tasks collections, for example), and collections always have children: Each object in the collection is a child of the collection itself.

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment