Hello All
I have created an Excel Dashboard using PivotCharts and then slicers for selections.
I am trying to create one button that will always reset my slicers back to the main set up i began with after presenting the dashboard and making various slicer suggestions during the meeting.
I can do this by using the following code, however i would like to shorten the code if possible instead of having to selecting each of the ones required as false individually.
Is there a way of doing this?
In brief i want to make one selection of the slicer as "True" and leave the remaining as "False".
I have searched the forum but cannot find anything that does what i need, so apologies if this has been addressed previously as i could not find it.
As always, i appreciate your help.
Thanks
Charllie
I have created an Excel Dashboard using PivotCharts and then slicers for selections.
I am trying to create one button that will always reset my slicers back to the main set up i began with after presenting the dashboard and making various slicer suggestions during the meeting.
I can do this by using the following code, however i would like to shorten the code if possible instead of having to selecting each of the ones required as false individually.
Is there a way of doing this?
In brief i want to make one selection of the slicer as "True" and leave the remaining as "False".
VBA Code:
With ActiveWorkbook.SlicerCaches("Slicer_Investigating_Area")
.SlicerItems("Customer Services").Selected = True
.SlicerItems("Despatch").Selected = False
.SlicerItems("Origination").Selected = False
.SlicerItems("Packing").Selected = False
.SlicerItems("Production").Selected = False
.SlicerItems("Site 4").Selected = False
.SlicerItems("Goods In").Selected = False
.SlicerItems("Other").Selected = False
.SlicerItems("Picking").Selected = False
.SlicerItems("Quality").Selected = False
.SlicerItems("Site 1l").Selected = False
.SlicerItems("Site 2").Selected = False
.SlicerItems("Site 3").Selected = False
.SlicerItems("Supplier").Selected = False
End With
I have searched the forum but cannot find anything that does what i need, so apologies if this has been addressed previously as i could not find it.
As always, i appreciate your help.
Thanks
Charllie