Skip to content

Latest commit

 

History

History
73 lines (39 loc) · 1.8 KB

Project.resourcegroups(object).md

File metadata and controls

73 lines (39 loc) · 1.8 KB
title ms.service ms.assetid ms.date ms.localizationpriority
ResourceGroups object (Project)
project-server
37bd0f3a-4d0e-1311-4409-ed31e0fe2e3a
06/08/2017
medium

ResourceGroups object (Project)

Represents all of the resource-based group definitions. ResourceGroups is a collection of Group objects.

Using the ResourceGroups Collection

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

Dim rg As Group 
Dim rGroups As String 
 
For Each rg in ActiveProject.ResourceGroups 
 rGroups = rGroups & rg.Name & vbCrLf 
Next rg 
 
MsgBox rGroups

Use the Add method to add a Group object to the ResourceGroups collection. The following example creates a new group that groups resources by their standard rate and then modifies the criterion so that the resources are sorted in descending order.

ActiveProject.ResourceGroups.Add "Resources by Rate", "Standard Rate" 
ActiveProject.ResourceGroups("Resources by Rate").GroupCriteria(1).Ascending = False

Remarks

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

Methods

Name
Add
Copy

Properties

Name
Application
Count
Item
Parent

[!includeSupport and feedback]