Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 1.36 KB

Excel.PivotTable.DisplayImmediateItems.md

File metadata and controls

49 lines (31 loc) · 1.36 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
PivotTable.DisplayImmediateItems property (Excel)
vbaxl10.chm235146
vbaxl10.chm235146
Excel.PivotTable.DisplayImmediateItems
796529b1-1f19-4e86-b172-1b2e4173b045
05/08/2019
medium

PivotTable.DisplayImmediateItems property (Excel)

Returns or sets a Boolean that indicates whether items in the row and column areas are visible when the data area of the PivotTable is empty. Set this property to False to hide the items in the row and column areas when the data area of the PivotTable is empty. The default value is True.

Syntax

expression.DisplayImmediateItems

expression A variable that represents a PivotTable object.

Example

This example determines how the PivotTable was created and notifies the user. It assumes that a PivotTable exists on the active worksheet.

Sub CheckItemsDisplayed() 
 
 Dim pvtTable As PivotTable 
 
 Set pvtTable = ActiveSheet.PivotTables(1) 
 
 ' Determine how the PivotTable was created. 
 If pvtTable.DisplayImmediateItems = True Then 
 MsgBox "Fields have been added to the row or column areas for the PivotTable report." 
 Else 
 MsgBox "The PivotTable was created by using object-model calls." 
 End If 
 
End Sub

[!includeSupport and feedback]