[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2227
  • Last Modified:

MS Project - access Project Summary Task in VBA?

Is there a way to access the Project Summary Task in vba (when Show Project Summary Task is checked in Options | View)? When the mpp is exported to Excel, the Project Summary Task, with ID 0, is included, but when I traverse the tasks in VBA (For Each Task In
ActiveProject.Tasks) The Project Summary/TaskID 0 is not included, but if it has child tasks they are included. The resulting recordset doesn't make much sense.

I have an automation project that needs the Project Summary Task, if it is selected in the mpp. I suppose I could save the mpp to xls before working with the tasks in vba, but I'd rather avoid that step if possible.
0
dgmoore1
Asked:
dgmoore1
  • 3
1 Solution
 
Dr. Thomas HenkelmannDirector Consulting ServicesCommented:
You can use the project summary task with ActiveProject.Tasks.UniqueID(0). This is independent from the settings in Options..View.
0
 
dgmoore1Author Commented:
Interesting. I wonder why it isn't returned when you iterate For All Tasks in ActiveProject.Tasks...  I'll try this in my code and see what I get
0
 
dgmoore1Author Commented:
I have determined that in order for the procedure I have developed to work correctly, the project summary task must be in MSP_TASKS. I am instructing my users not to employ Project's Show Project Summary Task.
0
 
dgmoore1Author Commented:
Determined that the project summary task, if used, must be in the Tasks table.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now