Group2.GroupCriteria property (Project)

Gets or sets the GroupCriteria2 collection representing the fields in a group definition. Read/write GroupCriteria2.

Syntax

expression. GroupCriteria

expression An expression that returns a Group2 object.

Example

The following example lists all of the group criteria in the second Group2 object of the TaskGroups2 collection.

Sub ListCriteria() 

 Dim criterionNum As Integer 

 Dim criteria As GroupCriteria2 

 Dim criterion As GroupCriterion2 

 

 Set criteria = ActiveProject.TaskGroups2(2).GroupCriteria 

 criterionNum = 1 

 

 For Each criterion In criteria 

 Debug.Print "Criterion " & criterionNum & ", Field name: " & criterion.FieldName 

 criterionNum = criterionNum + 1 

 Next criterion 

End Sub

See also

Group2 Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.