Hello,
I have several buttons on my Spreadsheet that use different macros to open details view using Slicer tables.
I'm having an issue that periodically the selections within the Slicer may change or one item doesn't exist.
When a value doesn't exist within the slicer, I get a runtime error and have to remove that selection or tweak the data to add bogus info.
it may exist in Program, but not in Program2.
I want to identify the single sliceritem as True and ALL OTHERS as false.
Below is an example of the macro as it was created when I used the Record macro option:
Thanks in advance for any ideas/input.
I have several buttons on my Spreadsheet that use different macros to open details view using Slicer tables.
I'm having an issue that periodically the selections within the Slicer may change or one item doesn't exist.
When a value doesn't exist within the slicer, I get a runtime error and have to remove that selection or tweak the data to add bogus info.
it may exist in Program, but not in Program2.
I want to identify the single sliceritem as True and ALL OTHERS as false.
Below is an example of the macro as it was created when I used the Record macro option:
Code:
Sub Button_details()
'
' Button_details Macro
'
With ActiveWorkbook.SlicerCaches("Slicer_Program")
.SlicerItems("ABC").Selected = False
.SlicerItems("CBA").Selected = False
.SlicerItems("XYZ").Selected = True
.SlicerItems("#N/A").Selected = False
.SlicerItems("(blank)").Selected = False
End With
With ActiveWorkbook.SlicerCaches("Slicer_Program2")
.SlicerItems("ABC").Selected = False
.SlicerItems("XYZ").Selected = True
.SlicerItems("CBA").Selected = False
.SlicerItems("#N/A").Selected = False
.SlicerItems("(blank)").Selected = False
End With
Thanks in advance for any ideas/input.