April 2006
Beginner
1114 pages
98h 16m
English
pivottable.DisplayErrorString [= setting]
True displays a custom error when pivot table cells contain errors; False displays the standard error. Default is False.
Set this property to True and ErrorString to "" to turn off error messages, such as #DIV/0!, in the data area of a pivot table. The following code switches error messages on and off for a pivot table on the active worksheet:
Sub ToggleDataFieldErrors( )
Dim pt As PivotTable
' Run CreateOLAPPivotTable to create this pivot table.
Set pt = ActiveSheet.PivotTables(1)
' Turn error messages on/off.
pt.DisplayErrorString = Not pt.DisplayErrorString
pt.ErrorString = ""
End SubRead now
Unlock full access