GroupCriteria2.AddEx 方法(專案)GroupCriteria2.AddEx method (Project)

會將 GroupCriterion2 物件新增到 GroupCriteria2 集合,其中 CellColor 可以是十六進位值。Adds a GroupCriterion2 object to the GroupCriteria2 collection, where CellColor can be a hexadecimal value.


expressionexpression. AddEx( _FieldName_, _Ascending_, _FontName_, _FontSize_, _FontBold_, _FontItalic_, _FontUnderLine_, _FontColor_, _CellColor_, _Pattern_, _GroupOn_, _StartAt_, _GroupInterval_ )AddEx( _FieldName_, _Ascending_, _FontName_, _FontSize_, _FontBold_, _FontItalic_, _FontUnderLine_, _FontColor_, _CellColor_, _Pattern_, _GroupOn_, _StartAt_, _GroupInterval_ )

_運算式_會傳回 ' GroupCriteria2 ' 物件的運算式。expression An expression that returns a 'GroupCriteria2' object.


名稱Name 必要/選用Required/Optional 資料類型Data type 描述Description
FieldNameFieldName 必要Required StringString 群組依據的欄位名稱。The name of the field being grouped by.
AscendingAscending 選用Optional 布林值Boolean True 如果應該以遞增順序分組群組定義的欄位。True if the field in a group definition should be grouped in ascending order. False 表示欄位應該群組以遞減順序。False if the field should be grouped in descending order. 預設值為 TrueThe default value is True.
FontNameFontName 選用Optional StringString 群組定義的字型名稱。The name of the font for a group definition.
FontSizeFontSize 選用Optional [INT][INT] 群組定義中的字型大小 (以點為單位)。The size of the font in a group definition, in points. 預設值是 8。The default value is 8.
FontBoldFontBold 選用Optional 布林值Boolean True 是表示 如果群組定義的字型是粗體。True if the font in a group definition is bold. 預設值為 TrueThe default value is True.
FontItalicFontItalic 選用Optional BooleanBoolean True 是表示 如果群組定義的字型是斜體格式。True if the font in a group definition is italic. 預設值為 FalseThe default value is False.
FontUnderLineFontUnderLine 選用Optional 布林值Boolean True 是表示 如果群組定義的字型有加底線。True if the font in a group definition is underlined. 預設值為 FalseThe default value is False.
FontColorFontColor 選用Optional LongLong 群組定義中的字型色彩,其中的色彩可以是十六進位值。The color of the font in a group definition, where color can be a hexadecimal value. 請參閱註解。See remarks. 預設值為 &H0。The default value is &H0.
CellColorCellColor 選用Optional LongLong 由十六進位值指定的儲存格背景色彩。The color of the cell background specified by a hexadecimal value. 請參閱註解。See remarks. 預設值為 &HFFFFFF。The default value is &HFFFFFF.
PatternPattern 選用Optional PjBackgroundPatternPjBackgroundPattern 在 [群組定義的儲存格的圖樣。The pattern for the cells in a group definition. 可以是 PjBackgroundPattern 常數之一。Can be one of the PjBackgroundPattern constants.
GroupOnGroupOn 選用Optional PjGroupOnPjGroupOn 在 [群組定義群組的類型。The type of grouping in a group definition. 可以是 PjGroupOn 常數之一。Can be one of the PjGroupOn constants. 預設值為 pjGroupOnEachValueThe default value is pjGroupOnEachValue.
StartAtStartAt 選用Optional VariantVariant 群組定義中間隔的開始時間。The start of the intervals in a group definition. 除了其中的字串為「專案開始日期」的日期欄位以外,所有欄位的預設值均為 0。The default value is 0 for all fields except date fields, where it is the string "Project Start Date".
GroupIntervalGroupInterval 選用Optional VariantVariant 群組定義中的間隔。The interval in a group definition. 預設值為 1。The default value is 1.

傳回值Return value



RGB 色彩可以使用十進位或十六進位值來表示。RGB colors can be expressed in decimal or hexadecimal values. 在 Project 中,紅色是十六進位值的最後一個位元組。In Project, red is the last byte of a hexadecimal value. 例如,如果 CellColorEx 的值是 65535,色彩就是藍色 (&HFF0000)。For example, if the value of CellColorEx is 65535, the color is blue (&HFF0000).

標準 RGB 色彩的有效範圍是 0 到 16,777,215 (&HFFFFFF&)。The valid range for a normal RGB color is 0 to 16,777,215 (&HFFFFFF&). 每個色彩的設定 (屬性或引數) 都是 4 個位元組的整數。Each color setting (property or argument) is a 4-byte integer. 這個範圍內的高位元組會等於 0。The high byte of a number in this range equals 0. 較低的 3 個位元組會以最小顯著性位元組到最大顯著性位元組排列,以個別決定紅色、綠色及藍色的比重。The lower 3 bytes, from least to most significant byte, determine the amount of red, green, and blue, respectively. 紅色、綠色及藍色元件會個別由一個介於 0 到 255 之間 (&HFF) 的數字來表示。The red, green, and blue components are each represented by a number between 0 and 255 (&HFF).

另請參閱See also

GroupCriteria2 集合物件GroupCriteria2 Collection Object

支援和意見反應Support and feedback

有關於 Office VBA 或這份文件的問題或意見反應嗎?Have questions or feedback about Office VBA or this documentation? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.