Skip to content

Latest commit

 

History

History
79 lines (40 loc) · 1.77 KB

Project.resourcegroups2(object).md

File metadata and controls

79 lines (40 loc) · 1.77 KB
title ms.service ms.assetid ms.date ms.localizationpriority
ResourceGroups2 object (Project)
project-server
b1328c39-42bc-4e9b-e268-1f308cd7ebb1
06/08/2017
medium

ResourceGroups2 object (Project)

Represents all of the resource-based group definitions, where group hierarchy can be maintained. ResourceGroups2 is a collection of Group2 objects.

Example

Using the ResourceGroups2 Collection

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

Dim rg2 As Group2  
Dim rGroups2 As String  
  
For Each rg2 in ActiveProject.ResourceGroups2  
    rGroups2 = rGroups2 & rg2.Name & vbCrLf  
Next rg2  
  
MsgBox rGroups2

Use the Add method to add a Group2 object to the ResourceGroups2 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.ResourceGroups2.Add "Resources by Rate", "Standard Rate"  
ActiveProject.ResourceGroups2("Resources by Rate").GroupCriteria(1).Ascending = False

Methods

Name
Add
Copy

Properties

Name
Application
Count
Item
Parent

See also

Project Object Model

[!includeSupport and feedback]