I want to change the workbook slicer style to “SlicerStyleDark5 2” when I run this but I get the message “Wrong number of arguments or invalid property assignment”. Can you help?
Code:
Sub DarkBlue()Dim slc As SlicerCache
Dim sl As Slicer
Dim I As Long
For Each slc In ActiveWorkbook.SlicerCaches
For I = 1 To slc.Slicers.Count
Set sl = slc.Slicers(I)
sl.Style = "SlicerStyleDark5 2"
Next I
Next slc
End Sub