GroupCriterion オブジェクト (Project)
グループ定義の条件を表します。 GroupCriterion オブジェクトは、 GroupCriteria コレクションのメンバーです。
注釈
グループ階層を維持し、セルの色を 16 進値で指定するグループを使用する場合は、 GroupCriterion2 オブジェクトのトピックを参照してください。
例
GroupCriterion オブジェクトを使用する
単一の GroupCriterion オブジェクトを返すには、**GroupCriteria(**Index) を使用します。Index は基準インデックスです。 青に標準単価リソース グループ内の最初の条件のセルの色を設定する例を次にします。
ActiveProject.ResourceGroups("Standard Rate").GroupCriteria(1).CellColor = pjBlue
GroupCriteria コレクションを使用する
Use the GroupCriteria property to return a GroupCriteria collection. 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 GC As GroupCriterion
Dim Fields As String
For Each GC In ActiveProject.TaskGroups("Priority Keeping Outline Structure").GroupCriteria
If GC.Ascending = True Then
Fields = Fields & GC.Index & ". " & GC.FieldName & " is sorted in ascending order." & vbCrLf
Else
Fields = Fields & GC.Index & ". " & GC.FieldName & " is sorted in descending order." & vbCrLf
End If
Next GC
MsgBox Fields
GroupCriteria コレクションに GroupCriterion オブジェクトを追加するには、Add メソッドを使用します。 次の例は、指定したリソース グループに新しいグループ化条件、つまり、作業時間の達成率 25% ごとにグループ化し、昇順に並べ替えるという条件を追加します。
ActiveProject.ResourceGroups("Response Pending").GroupCriteria.Add "% Work Complete", True, CellColor:=pjRed, GroupOn:=pjGroupOnPct1_25
メソッド
名前 |
---|
Delete |
プロパティ
名前 |
---|
Application |
昇順 |
割り当て |
CellColor |
FieldName |
FontBold |
FontColor |
FontItalic |
FontName |
FontSize |
FontUnderLine |
GroupInterval |
GroupOn |
インデックス |
Parent |
Pattern |
StartAt |
サポートとフィードバック
Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示