Table of contents
TOC
Collapse the table of content
Expand the table of content

ResourceGroups2 Object (Project)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

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

Other resources

Project Object Model

© 2017 Microsoft