Hello,
Not sure if anyone has idea why my code gets stuck in below yellow line, The purpose of the code is to loop slicerItems one by one in one slicer.
I took quite a time but still can't figure out this.
Thanks in advance!
Dim sI As SlicerItem
Dim sI2 As SlicerItem
Dim sC As SlicerCache
Dim index As Integer
Set sC = ActiveWorkbook.SlicerCaches("Slicer_Region_Code")
With sC
For index = 1 To sC.SlicerCacheLevels.Count
For Each sI In sC.SlicerCacheLevels(index).SlicerItems
sC.ClearManualFilter
For Each sI2 In sC.SlicerCacheLevels(index).SlicerItems
If sI.Name = sI2.Name Then
sI2.Selected = True
Else: sI2.Selected = False
End If
Next
Next
Next
End With
End Sub
Not sure if anyone has idea why my code gets stuck in below yellow line, The purpose of the code is to loop slicerItems one by one in one slicer.
I took quite a time but still can't figure out this.
Thanks in advance!
Dim sI As SlicerItem
Dim sI2 As SlicerItem
Dim sC As SlicerCache
Dim index As Integer
Set sC = ActiveWorkbook.SlicerCaches("Slicer_Region_Code")
With sC
For index = 1 To sC.SlicerCacheLevels.Count
For Each sI In sC.SlicerCacheLevels(index).SlicerItems
sC.ClearManualFilter
For Each sI2 In sC.SlicerCacheLevels(index).SlicerItems
If sI.Name = sI2.Name Then
sI2.Selected = True
Else: sI2.Selected = False
End If
Next
Next
Next
End With
End Sub