SlicerCache.SortItems property (Excel)

Returns or sets the sort order of the items in the slicer. Read/write XlSlicerSort.

Syntax

expression.SortItems

expression A variable that represents a SlicerCache object.

Return value

XlSlicerSort

Remarks

The default setting of this property is xlSlicerSortAscending.

The SortItems property only applies to slicers that are based on PivotTables that are connected to workbook ranges or lists (SlicerCache.SourceType = xlDatabase).

Attempting to access the SortItems property for slicers that are connected to OLAP data sources (SlicerCache.OLAP = True) generates a run-time error. For OLAP data sources, use the SortItems property of the SlicerCacheLevel object instead.

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.