BorderThemeColorIndex 属性 (权限)CommandButton.BorderThemeColorIndex property (Access)

获取或设置一个值,该值代表与指定对象的 边框颜色 属性相关联的应用的颜色主题中的颜色。Gets or sets a value that represents a color in the applied color theme associated with the BorderColor property of the specified object. 读/写 Read/write Long.



_表达式_一个代表**命令按钮** 对象的变量。expression A variable that represents a CommandButton object.


BorderThemeColorIndex 属性包含下表中列出的索引值之一。The BorderThemeColorIndex property contains one of the index values listed in the following table.

索引值Index value 说明Description
00 文字 1Text 1
11 背景 1Background 1
2 2 文字 2Text 2
3 3 背景 2Background 2
4 4 强调文字颜色 1Accent 1
5 5 强调文字颜色 2Accent 2
6 6 强调文字颜色 3Accent 3
7 7 强调文字颜色 4Accent 4
8 8 强调文字颜色 5Accent 5
9 9 强调文字颜色 6Accent 6
10 10 超链接Hyperlink
11 11 已访问的超链接Followed Hyperlink

如果应用了无主题,则 BorderThemeColorIndex 属性包含-1。If no theme is applied, the BorderThemeColorIndex property contains -1.

此属性未出现在属性表中。This property is not surfaced in the property sheet.


下面的代码示例通过设置BorderThemeColorIndex属性, 将边框颜色设置为文本2的颜色。The following code example sets the border color to the Text 2 color by setting the BorderThemeColorIndex property.


支持和反馈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.