【问题标题】:How to get the "Data Validation" CommandBarButton object?如何获取“数据验证”CommandBarButton 对象?
【发布时间】:2012-07-28 18:00:19
【问题描述】:

当用户切换到特定工作表时,我需要隐藏 数据验证 按钮,但我无法在 Application.CommandBars 中找到此按钮。

我已尝试循环出所有CommandBar 对象及其控件名称,但仍未找到,之前有人尝试过吗?

【问题讨论】:

    标签: excel vsto add-in office-2007 commandbar


    【解决方案1】:

    在 Excel 2007 中,数据验证按钮位于功能区 UI(不是命令栏) - 如果不覆盖现有功能区,您将无法禁用它组(GroupDataTools)。有关如何覆盖现有功能区组的信息,请参阅此 related SO post。要在功能区中找到菜单组的控件 ID,您可以download this list of control ids from Microsoft

    【讨论】:

    猜你喜欢
    • 2022-08-08
    • 1970-01-01
    • 2021-05-19
    • 2013-06-04
    • 2018-05-10
    • 2013-12-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多