ComboBox.ForeThemeColorIndex 屬性 (Access)ComboBox.ForeThemeColorIndex property (Access)

取得或設定代表所套用與指定物件 BorderColor 屬性相關聯之色彩佈景主題色彩的值。Gets or sets a value that represents a color in the applied color theme associated with the ForeColor property of the specified object. 可讀寫的 LongRead/write Long.

語法Syntax

運算式ForeThemeColorIndexexpression.ForeThemeColorIndex

_運算式_代表**ComboBox** 物件的變數。expression A variable that represents a ComboBox object.

註解Remarks

ForeThemeColorIndex 屬性包含下表所列的索引值的其中一個。The ForeThemeColorIndex property contains one of the index values listed in the following table.

索引值Index Value 描述Description
00 文字 1Text 1
11 背景 1Background 1
22 文字 2Text 2
33 背景 2Background 2
44 輔色 1Accent 1
55 輔色 2Accent 2
66 輔色 3Accent 3
77 輔色 4Accent 4
8 8 輔色 5Accent 5
9 9 輔色 6Accent 6
10 10 超連結Hyperlink
11 11 已瀏覽過的超連結Followed Hyperlink

如果不套用任何佈景主題, ForeThemeColorIndex 屬性會包含-1。If no theme is applied, the ForeThemeColorIndex property contains -1.

此屬性不會呈現在屬性表中。This property is not surfaced in the property sheet.

範例Example

藉由設定ForeThemeColorIndex屬性,下列程式碼範例會設定前景色彩為 「 文字 2 」 色彩。The following code example sets the fore color to the Text 2 color by setting the ForeThemeColorIndex property.

Me.ctl.ForeThemeColorIndex=2

支援和意見反應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.