Share via


PivotField.HiddenItemsList Property

Excel Developer Reference

Returns or sets a Variant specifying an array of strings that are hidden items for a PivotTable field. Read/write.

Syntax

expression.HiddenItemsList

expression   A variable that represents a PivotField object.

Remarks

The HiddenItemsList property is only valid for Online Analytical Processing (OLAP) data sources; using this property on non-OLAP data sources will return a run-time error.

Example

The example sets the item list so that only certain items are displayed. It assumes an OLAP PivotTable exists on the active worksheet.

Visual Basic for Applications
  Sub UseHiddenItemsList()
ActiveSheet.PivotTables(1).PivotFields(1).<strong>HiddenItemsList</strong> = _
    Array("[Product].[All Products].[Food]", _
    "[Product].[All Products].[Drink]")

End Sub

See Also