Skip to content

Latest commit

 

History

History
80 lines (59 loc) · 3.15 KB

Excel.SlicerCache.md

File metadata and controls

80 lines (59 loc) · 3.15 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
SlicerCache object (Excel)
vbaxl10.chm896072
vbaxl10.chm896072
Excel.SlicerCache
6e6533e3-0503-a1d3-9ecd-f7997233565f
04/02/2019
medium

SlicerCache object (Excel)

Represents the current filter state for a slicer, and information about which PivotCache or WorkbookConnection object the slicer is connected to.

Remarks

Use the SlicerCaches property of the Workbook object to access the SlicerCaches collection of SlicerCache objects in a workbook.

Each slicer has a base SlicerCache object that represents the items displayed in the slicer and the current user interface state of the tiles displayed with their corresponding item captions. Each slicer control that the user sees in Excel is represented by a Slicer object that has a SlicerCache object associated with it.

Example

The following code example creates a SlicerCache object based on the Customer Geography OLAP hierarchy from the connection to the AdventureWorks database, and then creates a slicer on the Country level of that hierarchy in Sheet2 of the workbook.

With ActiveWorkbook 
 .SlicerCaches.Add("AdventureWorks", _ 
 "[Customer].[Customer Geography]").Slicers.Add SlicerDestination:="Sheet2", _ 
 Level:="[Customer].[Customer Geography].[Country]", Caption:="Country" 
End With 

Methods

Properties

See also

[!includeSupport and feedback]