Hi,
I have a table with 3 slicers, Supplier, Seg 1 and Seg 2.
A chart is created based on the selection in the slicers. I am wishing to generate a chart title from the selections. Everything works until the multi-select option is enabled. My code just brings back all items in the lists including hidden ones. Please can anyone help? This is my code (bit of a novice so please excuse if its crude!) for pulling back the selected items from a slicer - works great unless multi-select is on.
Set MySlicerCache = ActiveWorkbook.SlicerCaches(1)
n = 0
For i = 1 To MySlicerCache.SlicerItems.Count
With MySlicerCache.SlicerItems(i)
If .Selected = True Then
strGraphTitle1 = strGraphTitle1 & .Value & ", "
n = n + 1
End If
End With
Next i
If n = MySlicerCache.SlicerItems.Count Then
strGraphTitle1 = "ALL Suppliers"
Else
strGraphTitle1 = Left(strGraphTitle1, Len(strGraphTitle1) - 2)
End If
Bookmarks