I could kiss you!!! i've been looking for this FOREVER!!!! THANK YOU!!!! but i want the first thing to be selected, so im going with
Sub Update_Slicer_Date()
Dim i As Long, n As Long
With ActiveWorkbook.SlicerCaches("Slicer_Day_of_Week")
n = .SlicerItems.Count
For i = 2 To n - 0
.SlicerItems(i).Selected = False
Next i
.SlicerItems(n).Selected = False
End With
With ActiveWorkbook.SlicerCaches("Slicer_Day_of_Date")
n = .SlicerItems.Count
For i = 2 To n - 0
.SlicerItems(i).Selected = False
Next i
.SlicerItems(n).Selected = False
End With
End Sub
![Quote](images/misc/quote_icon.png)
Originally Posted by
Paul_Hossler
To select the last Slicer item, try something like this
Sub test()
Dim i As Long, n As Long
With ActiveWorkbook.SlicerCaches("Slicer_Account")
n = .SlicerItems.Count
For i = 1 To n - 1
.SlicerItems(i).Selected = False
Next I
.SlicerItems(n).Selected = True
End With
End Sub