Skip to content

Latest commit

 

History

History
55 lines (33 loc) · 1.4 KB

Excel.PivotTable.DisplayEmptyColumn.md

File metadata and controls

55 lines (33 loc) · 1.4 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
PivotTable.DisplayEmptyColumn property (Excel)
vbaxl10.chm235154
vbaxl10.chm235154
Excel.PivotTable.DisplayEmptyColumn
5911c818-282e-bb61-06c2-351cc4c2086d
05/08/2019
medium

PivotTable.DisplayEmptyColumn property (Excel)

Returns True when the non-empty MDX keyword is included in the query to the OLAP provider for the value axis. The OLAP provider will not return empty columns in the result set. Returns False when the non-empty keyword is omitted. Read/write Boolean.

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 that a PivotTable connected to an OLAP data source exists on the active worksheet.

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

[!includeSupport and feedback]