ErrorString 属性 (Excel)PivotTable.ErrorString property (Excel)

返回或设置一个 String 值,它代表 DisplayErrorString 属性为 True 时如果单元格中有错误而显示的字符串。Returns or sets a String value that represents the string displayed in cells that contain errors when the DisplayErrorString property is True.

语法Syntax

表达式ErrorStringexpression.ErrorString

_表达式_一个代表**PivotTable** 对象的变量。expression A variable that represents a PivotTable object.

注解Remarks

此属性的默认值为空字符串 ("")。The default value for this property is an empty string ("").

示例Example

本示例在指定数据透视表中包含错误的单元格中显示一个连字符。This example displays a hyphen in cells that contain errors in the specified PivotTable report.

With Worksheets(1).PivotTables("Pivot1") 
 .ErrorString = "-" 
 .DisplayErrorString = True 
End With

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