ErrorString Property

Applies To

ODBCError object, PivotTable object.

Description

PivotTable object: Returns or sets the string displayed in cells that contain errors when the DisplayErrorString property is True. The default value is an empty string (""). Read/write String.

ODBCError object: Returns the ODBC error string. Read-only String.

See Also

DisplayErrorString property, NullString property.

Example

This example causes the PivotTable to display a hyphen in cells that contain errors.

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