默认情况下在切片器上启用多选 [英] Enable Multi-select on slicer by default
问题描述
我的工作簿中有切片器,默认情况下需要启用多选功能.
I have slicers in my workbook that I need multi-select enabled by default.
我尝试了SendKeys.
I tried SendKeys.
ActiveSheet.Shapes.Range(Array("WMS")).Select
SendKeys "%S", True
ActiveSheet.Shapes.Range(Array("Equipment")).Select
SendKeys "%S", True
ActiveSheet.Shapes.Range(Array("Warehousing Skills")).Select
SendKeys "%S", True
ActiveSheet.Shapes.Range(Array("OCF Skills")).Select
SendKeys "%S", True
这将按预期选择切片器,但 sendkeys
未启用多重选择.
This selects the slicers as intended but the sendkeys
did not enable multi-select.
我尝试在 sendkeys
命令之前和之后添加一个暂停.
I tried adding a pause before and after the sendkeys
command.
我尝试选择两个切片器选项.这不会启用多选.
I tried selecting two slicer options. This did not enable multi-select.
推荐答案
我不相信您可以像我在撰写本文时那样以编程方式更改Multiselect切换...该属性不会通过VBA向用户公开.看起来您要么必须手动更改所有切片器上的设置,要么告诉您的用户在进行选择时按住CTRL键(这使他们可以进行多个选择,就像激活了该切换一样).
I don't believe you can programatically change that Multiselect toggle as at the time I write this...that property isn't exposed to the user via VBA. Looks like you've either got to go change that setting on all slicers manually, or teach your users to hold down the CTRL key while they make their selections (which lets them make multiple selections as if that toggle was activated).
这篇关于默认情况下在切片器上启用多选的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!