グループの階層構造を維持することができ、セルの色は 16 進値を指定できます、グループ定義の条件を表します。 GroupCriterion2 オブジェクトは、 GroupCriteria2 コレクションのメンバーです。
例
GroupCriterion2 オブジェクトの使い方
単一の GroupCriterion2 オブジェクトを返すには、**GroupCriteria2(**Index) を使用します。Index は基準インデックスです。 青に標準単価リソース グループ内の最初の条件のセルの色を設定する例を次にします。
ActiveProject.ResourceGroups2("Standard Rate").GroupCriteria2(1).CellColor = &HFF0000
GroupCriteria2 コレクションの使い方
GroupCriteria2 コレクションを取得するには、GroupCriteria プロパティを使用します。 The following example displays a list of the fields used as criteria in the specified task group and shows whether they are sorted in ascending or descending order.
Dim GC2 As GroupCriterion2
Dim Fields As String
For Each GC2 In ActiveProject.TaskGroups2("Priority Keeping Outline Structure").GroupCriteria
If GC2.Ascending = True Then
Fields = Fields & GC2.Index & ". " & GC2.FieldName & " is sorted in ascending order." & vbCrLf
Else
Fields = Fields & GC2.Index & ". " & GC2.FieldName & " is sorted in descending order." & vbCrLf
End If
Next GC2
MsgBox Fields
AddEx メソッドを使用して GroupCriterion2 オブジェクトを GroupCriteria2 コレクションに追加します。CellColor は 16 進値にすることができます。 次の例は、指定したリソース グループに新しいグループ化条件、つまり、作業時間の達成率 25% ごとにグループ化し、昇順に並べ替えるという条件を追加します。
ActiveProject.ResourceGroups2("Response Pending").GroupCriteria2.AddEx "% Work Complete", True, _
CellColor:=&H0101FF, GroupOn:=pjGroupOnPct1_25
メソッド
名前 |
---|
Delete |
プロパティ
名前 |
---|
Application |
昇順 |
割り当て |
CellColor |
CellColorEx |
FieldName |
FontBold |
FontColor |
FontColorEx |
FontItalic |
FontName |
FontSize |
FontUnderLine |
GroupInterval |
GroupOn |
インデックス |
Parent |
Pattern |
StartAt |
関連項目
サポートとフィードバック
Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。