Why in the VSTO development Excel AddIn environment, the "Refresh All" button clicked by Excel will cause the Click event of the custom CommandBarButton to fail?

MaiXiaoMeng 1 Reputation point
2021-02-09T09:22:37.697+00:00

为什么在 VSTO 开发 Excel AddIn 环境中, Excel 点击的 “数据” > "数据和连接" > “全部刷新” 按键会导致自定义 CommandBarButton 的 Click 事件失效?

在不点击 “数据” > "数据和连接" > “全部刷新” 按键的情况下,自定义 CommandBarButton 的 Click 是会一直生效的。

下面是我创建 CommandBar 的代码:

65791-%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE-20210209130429.png

----------

Translated from Chinese to English:

Why does Excel click "Data"> "Data and Connection"> "Refresh All" in the VSTO development Excel AddIn environment, which will cause the Click event of the custom CommandBarButton to fail?

Without clicking the "Data"> "Data and Connection"> "Refresh All" button, the Click of the custom CommandBarButton will always take effect.

Here is my code to create the CommandBar:

65791-%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE-20210209130429.png

Microsoft 365 and Office | Development | Other
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.