Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50178

Slicer reset vba

$
0
0
Hi,

In my report, I have one slicer on Sheet1 and 3 slicers on Sheet2. I created a "Reset All Slicers" button on sheet2 linking it to the following vba code, but this resets all slicers in the entire workbook. Can someone assist in tweaking this so that it resets only the slicers on Sheet2?:confused: Thanks in advance.

/**

Option Explicit

Sub slicer_reset()

Dim slcr As SlicerCache

For Each slcr In ActiveWorkbook.SlicerCaches

slcr.ClearManualFilter
Next slcr

End Sub

**/

Viewing all articles
Browse latest Browse all 50178

Trending Articles