Hello,

I'm currently using the following code to change which filters are selected in a slicer based on a user input. I know a for loop could be used, but I'm new to VBA and don't know how it would be structured. Only one slicer option will be selected at a time based on the user input. If the slicer item matches the input, then that item should be set to "True" while all other items should be set to "False". If the input does not match the any of the slicer items, I would like to return an error message.

Please Login or Register  to view this content.
I have tried some previously posted solutions, but none have worked so far.
Thanks for your help