JimMatthews
New Member
- Joined
- Aug 12, 2014
- Messages
- 9
Hi
I want to write a macro that gets the name of all the slicers on the active sheet. I have written this code, and that seems to loop through all the slicers in the book, not the sheet. I want to just find the ones on the active sheet.
Any help appreciated
I want to write a macro that gets the name of all the slicers on the active sheet. I have written this code, and that seems to loop through all the slicers in the book, not the sheet. I want to just find the ones on the active sheet.
Code:
Sub FindSlicers()
Dim mySlicer As SlicerCache
For Each mySlicer In ActiveWorkbook.SlicerCaches
x = mySlicer.Name
Next mySlicer
End Sub
Any help appreciated