SlicerCache.VisibleSlicerItems (Excel)

Returns a SlicerItems collection that contains the collection of all the visible items in the specified slicer cache.

The VisibleSlicerItems property is only applicable for slicers that are based on PivotTables based on workbook ranges or lists (SlicerCache.SourceType = xlDatabase). Attempting to access the VisibleSlicerItems property for slicers that are connected to an OLAP data source (SlicerCache.OLAP = True) generates a run-time error.


Dim sisVisibleSlicerItems As SlicerItems
Set sisVisibleSlicerItems = ActiveWorkbook.SlicerCaches(1).VisibleSlicerItems