ClearFormats 方法 (Excel)Range.ClearFormats method (Excel)

清除对象的格式设置。Clears the formatting of the object.

语法Syntax

表达式ClearFormatsexpression.ClearFormats

expression 一个表示 Range 对象的变量。expression A variable that represents a Range object.

返回值Return value

VariantVariant

示例Example

此示例清除工作表 Sheet1 上 A1:G37 单元格区域的所有格式设置。This example clears all formatting from cells A1:G37 on Sheet1.

Worksheets("Sheet1").Range("A1:G37").ClearFormats

此示例清除工作表 Sheet1 上第一个嵌入式图表的格式设置。This example clears the formatting from embedded chart one on Sheet1.

Worksheets("Sheet1").ChartObjects(1).Chart.ChartArea.ClearFormats

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