excel默认情况下在切片器上启用多选 [英] excel enable Multi-select on slicer by default

查看:2302
本文介绍了excel默认情况下在切片器上启用多选的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作簿中有切片器,默认情况下需要启用多选功能.我无法找到任何方法来用VBA控制它.我什至尝试了SendKeys,但它似乎不起作用.

I have slicers in my workbook that I need multi-select enabled by default. I have not been able to find any way to control this with VBA. I even tried SendKeys but it doesnt seem to be working.

这是当前的不起作用的Sendkeys代码.

Here is the current Not working Sendkeys code.

    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

这是按预期选择切片器,但是sendkey不能启用多选.我曾尝试在sendkey命令之前和之后添加一个暂停,但是似乎仍然无法使它正常工作.

This is selecting the slicers as intended but the sendkeys are not enabling multi-select. I have tried adding a pause before and after the sendkey command but still cannot seem to get it to work.

我什至尝试让VBA选择两个切片器选项.这确实可行,并选择了两个选项,但并未强制启用多重选择.

I even tried having the VBA select two slicer options. This did work and selected two options but it did not force multi-select to be enabled.

推荐答案

我不相信您可以像我在撰写本文时那样以编程方式更改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).

这篇关于excel默认情况下在切片器上启用多选的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆