Skip to content

Latest commit

 

History

History
77 lines (55 loc) · 2.22 KB

Excel.Slicer.md

File metadata and controls

77 lines (55 loc) · 2.22 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Slicer object (Excel)
vbaxl10.chm904072
vbaxl10.chm904072
Excel.Slicer
577be0f6-4eda-0093-8899-097f3c900383
04/02/2019
medium

Slicer object (Excel)

Represents a slicer in a workbook.

Remarks

Each Slicer object represents a slicer in a workbook. Slicers are used to filter data in PivotTable reports or OLAP data sources.

Use the Add method to add a Slicer object to the Slicers collection. To access the SlicerItem object that represents the currently selected button in a slicer, use the ActiveItem property of the Slicer object.

Example

The following code example changes the caption for the first slicer in the first slicer cache to My Slicer.

ActiveWorkbook.SlicerCaches(1).Slicers(1).Caption = "My Slicer"

The following code example sets the width of the first slicer in the first slicer cache to equal 200 points.

ActiveWorkbook.SlicerCaches(1).Slicers(1).Width = 200

Methods

Properties

See also

[!includeSupport and feedback]