SlicerCache.Delete method (Excel)

Deletes the specified slicer cache and the slicers associated with it.

Syntax

expression.Delete

expression A variable that represents a SlicerCache object.

Remarks

To delete a particular slicer independently of the slicer cache, use the Delete method of the Slicer object instead.

Example

The following code example deletes the Slicer_Country slicer cache and the Country slicer associated with that slicer cache.

ActiveWorkbook.SlicerCaches("Slicer_Country").Delete

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.