gregsedwards
Instructor
Hi all!
I have been asked to create an automation solution using Project 2002/2003. It's your typical master/sub project scenario, with a couple of custom fields.
The automation, however, has me stumped. I'm a fairly proficient Excel VBA coder, but the Project object model is kinda foreign to me.
Here's what I'm being asked to do: The client is using Text2 and Number1 to track priority and to sort the subprojects within the master project. Text2 will indicate whether a project is within a High, Med, or Low priority group, and Number1 will indicate the relative numeric priority of the project within the tier. The user will set these at (get ready) EITHER the master or subproject level.
Now from what I've seen thus far, information about the subproject when viewed as a task of the master project doesn't necessarily reflect the project summary task information when the project is viewed standalone. In other words, when the user sets the Text2 field within the master project, the Text2 field in the project summary task of the nested project doesn't update automatically (and vice versa).
I suspect I'll need to use automation to "push" values from the master project down to subprojects' source project summary tasks. Additionally, some automation will be required to "pull" values from the subprojects' summary tasks into the master project's tasks. Something like:
ActiveProject.Subprojects(1).SourceProject.ProjectSummaryTask.Text2 = ActiveProject.Subprojects(1).InsertedProjectSummary.Text2
Please tell me if I'm even close here. Anyway, the other issue is how to trigger the automation. The Object Browser shows several cool events for the application object, but I don't seem to be able to access any of them, save a couple like Project_Open. How do I handle events, such as when the user changes a task's fields, or when the user's selection changes?
Any advice would be appreciated. Thanks!
- Greg Edwards
I have been asked to create an automation solution using Project 2002/2003. It's your typical master/sub project scenario, with a couple of custom fields.
The automation, however, has me stumped. I'm a fairly proficient Excel VBA coder, but the Project object model is kinda foreign to me.
Here's what I'm being asked to do: The client is using Text2 and Number1 to track priority and to sort the subprojects within the master project. Text2 will indicate whether a project is within a High, Med, or Low priority group, and Number1 will indicate the relative numeric priority of the project within the tier. The user will set these at (get ready) EITHER the master or subproject level.
Now from what I've seen thus far, information about the subproject when viewed as a task of the master project doesn't necessarily reflect the project summary task information when the project is viewed standalone. In other words, when the user sets the Text2 field within the master project, the Text2 field in the project summary task of the nested project doesn't update automatically (and vice versa).
I suspect I'll need to use automation to "push" values from the master project down to subprojects' source project summary tasks. Additionally, some automation will be required to "pull" values from the subprojects' summary tasks into the master project's tasks. Something like:
ActiveProject.Subprojects(1).SourceProject.ProjectSummaryTask.Text2 = ActiveProject.Subprojects(1).InsertedProjectSummary.Text2
Please tell me if I'm even close here. Anyway, the other issue is how to trigger the automation. The Object Browser shows several cool events for the application object, but I don't seem to be able to access any of them, save a couple like Project_Open. How do I handle events, such as when the user changes a task's fields, or when the user's selection changes?
Any advice would be appreciated. Thanks!
- Greg Edwards