Workbook.ActiveSlicer (Excel)

Returns an object that represents the active slicer in the active workbook or in the specified workbook. Returns Nothing if no slicer is active.

If you do not specify a Workbook object, this property returns the active slicer in the active workbook.


Dim slcActiveSlicer As Slicer
Set slcActiveSlicer = ActiveWorkbook.ActiveSlicer