Any suggestions on how to apply the ActiveX dropdown with VB to change the slicers on this SkyDrive file: http://sdrv.ms/1d6rXcx
For example, I want the dropdown in cell F4 on sheet 'Dash-1' to change the filters on both of the "Specialty" slicers located on sheet 'Dash-1'. For some specialties, there may be multiple selections. The dummy columns on sheet 'SummaryChart' correspond to the Specialty column on the 'SummaryChart'. The Specialty column on the 'SummaryChart' feeds the dropdown in cell F4 on sheet 'Dash-1'.
That will give you the code to modify the slicer. With the dropdown, you'll be able to use the Change event to trigger things, and then link it all together. Sorry I don't have the time atm to put it all together myself, but hopefully it's a fun learning experience.
I have updated the workbook to include the code below in sheet 'Dash-2'. I incorrectly referenced 'Dash-1' in my previous post, as I should have referenced 'Dash-2'.
This is a start; however, does not fully accomplish what I am attempting to do and seems inefficient:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim SI As SlicerItem
Application.EnableEvents = False
If Not Intersect(Target, Range("F4")) Is Nothing Then With ActiveWorkbook.SlicerCaches("Slicer_Specialty1")
.ClearManualFilter
For Each SI In .SlicerItems
SI.Selected = UCase(SI.Value) = UCase(Range("F4").Value)
Next SI
End With
End If
ExitSub:
Application.EnableEvents = True
End Sub
If I change the bold/red line to include another slicer entered as such below, the code fails entirely.
With ActiveWorkbook.SlicerCaches("Slicer_Specialty1", "Slicer_Specialty")
This code is also limited in that it only references the dropdown selection. I need it to reference the selection there, and based on the table on 'SummaryChart' match the information (table name: SummaryChart) to make slicer selections.