Select multiple values from an Excel table in a slicer using VBA

ecotm034

New Member
Joined
Jun 4, 2014
Messages
1
Hey guys,


I'm looking for a way to select multiple values from an Excel table ("products_to_select_in_slicer") in a slicer ("products_slicer") using VBA. Table "products_to_select_in_slicer" just have a single column.


Tried to find it on many forums. Never got it...


The only thing I found is this way (that is not possible in my situation):


Code:
ActiveWorkbook.SlicerCaches("products_slicer").VisibleSlicerItemsList = _
        Array( _
        "[products_to_select_in_slicer].[no_product].&[001]", "[products_to_select_in_slicer].[no_product].&[002]", _
        "[products_to_select_in_slicer].[no_product].&[003]", "[products_to_select_in_slicer].[no_product].&[004]")


Thanks a lot for your help!


Michael
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,215,575
Messages
6,125,619
Members
449,240
Latest member
lynnfromHGT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top