自定义菜单对 Excel 中的一个文档可见
我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的 - 所以这个网站将帮助您:
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 theApplication.CommandBars
object to do what you need.