SlicerCacheLevels Object
Collapse the table of content
Expand the table of content

SlicerCacheLevels Object (Excel)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Represents the collection of hierarchy levels for the OLAP data source that is filtered by a slicer.

When a slicer is used to filter an OLAP data source, its parent slicer cache can contain multiple hierarchy levels from the data source. Use the SlicerCacheLevels collection of the parent SlicerCache object to access the SlicerCacheLevel objects that represent these hierarchy levels. This collection is not accessible for non-OLAP data sources.

The following code example retrieves a SlicerCacheLevel object that represents the Country level of the Customer Geography hierarchy from the SlicerCacheLevel collection of the Country slicer.

ActiveWorkbook.SlicerCaches("Slicer_Customer_Geography"). _ 
 SlicerCacheLevels("[Customer].[Customer Geography].[Country]")
© 2016 Microsoft