自定义菜单对 Excel 中的一个文档可见

发布于 2024-10-08 00:29:19 字数 197 浏览 0 评论 0原文

我在 MS Excel 中创建了自定义菜单和工具栏。我想仅向特定文档显示此菜单和工具栏。当我打开任何其他 xls 文件时,它会显示该菜单和工具栏。

MS Excel 2003

如何使用 vba-excel 宏或任何其他方式来做到这一点?

如果您需要更多信息,请询问我。

谢谢 :)

I have created customized menu and toolbar in MS Excel. I wanted to show this menu and toolbar to specific document only. When I open any other xls file, it shows that menu and toolbar.

MS Excel 2003

How to do that using vba-excel macro or any other way to do that?

If you need more information, please ask me.

Thanks :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

中二柚 2024-10-15 00:29:19

好的 - 所以这个网站将帮助您:
http://www.ozgrid.com/VBA/custom-menus.htm

它实际上也适用于 Excel 2007,但在“加载项”选项卡下添加了菜单。

您基本上需要在 VBA 应用程序中访问 ThisWorkbook 的代码。从那里,您可以修改 Application.CommandBars 对象来执行您需要的操作。

OK - so this website will help you:
http://www.ozgrid.com/VBA/custom-menus.htm

It actually works in Excel 2007 also, but adds the menu under the Add-Ins tab.

You basically need to access the code for ThisWorkbook in the VBA application. From there, you can modify the Application.CommandBars object to do what you need.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文