ResourceGroups Collection Object

Project
ResourceGroups
Group

Represents all the resource-based group definitions.

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 Groups As String

For Each RG in ActiveProject.ResourceGroups
    Groups = Groups & RG.Name & vbCrLf
Next RG

MsgBox Groups

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

Properties | Application Property | Count Property | Item Property | Parent Property

Methods | Add Method | Copy Method

Parent Objects | Project Object, Projects Collection Object

Child Objects | Group Object, Groups Collection Object

See Also | ResourceGroups Property | TaskGroups Property