Syntax

expression.DisplayEmptyColumn

expression A variable that represents a PivotTable object.

Remarks

The PivotTable must be connected to an Online Analytical Processing (OLAP) data source to avoid a run-time error.

Example

This example determines the display settings for empty columns in a PivotTable. It assumes a PivotTable connected to an OLAP data source exists on the active worksheet.

Visual Basic for Applications
Sub CheckSetting() Dim pvtTable As PivotTable Set pvtTable = ActiveSheet.PivotTables(1) ' Determine display setting for empty columns. If pvtTable.DisplayEmptyColumn = False Then MsgBox "Empty columns will not be displayed." Else MsgBox "Empty columns will be displayed." End If End Sub
Display display empty column displayempty displayemptycolumn displayemptycolumn property

See also: