PivotField.HiddenItemsList (Excel)

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

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.


Sub UseHiddenItemsList() 
 
 ActiveSheet.PivotTables(1).PivotFields(1).HiddenItemsList = _ 
 Array("[Product].[All Products].[Food]", _ 
 "[Product].[All Products].[Drink]") 
 
End Sub