Skip to content

Latest commit

 

History

History
80 lines (40 loc) · 1.74 KB

Project.taskgroups(object).md

File metadata and controls

80 lines (40 loc) · 1.74 KB
title ms.service ms.assetid ms.date ms.localizationpriority
TaskGroups object (Project)
project-server
76d01102-cc38-36c1-f2fb-c5155f3056db
06/08/2017
medium

TaskGroups object (Project)

Represents all the task-based group definitions. TaskGroups is a collection of Group objects.

Remarks

For task groups where the group hierarchy can be maintained and cell color can be a hexadecimal value, use the TaskGroups2 collection object.

Example

Using the TaskGroups Collection

Use the TaskGroups property to return a TaskGroups collection. The following example lists the names of all the task groups in the active project.

Dim tg As Group 
Dim tGroups As String 
 
For Each tg in ActiveProject.TaskGroups 
 tGroups = tGroups & tg.Name & vbCrLf 
Next tg 
 
MsgBox tGroups

Use the Add method to add a Group object to the TaskGroups collection. The following example creates a new group that groups tasks by whether they are overallocated and then modifies the criterion so that overallocated tasks are sorted in descending order.

ActiveProject.TaskGroups.Add "Overallocated Tasks", "Overallocated" 
ActiveProject.TaskGroups("Overallocated Tasks").GroupCriteria(1).Ascending = False

Methods

Name
Add
Copy

Properties

Name
Application
Count
Item
Parent

[!includeSupport and feedback]