Excel 2007 vba 插件需要在使用这些方法的项目中引用吗?
我有一个 Excel 2007 插件(一个将宏保存为插件的工作簿),似乎需要其他书籍参考才能调用其方法。
这是正常的吗?我认为公共插件代码可以从任何地方调用?
有没有办法让方法可用于所有打开的工作簿而不创建显式引用?
我还在插件中添加了功能区自定义,并希望确保这些也能正常工作。
I have an Excel 2007 addin (a workbook with macros saved as an addin) that seems to require other books to reference before they can call its methods.
Is this normal? I thought public addin code could be called from anywhere?
Is there a way to have a method available to all workbooks that are opened without creating an explicit reference?
I'm also putting ribbon customizations in the addin and want to make sure these will also work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,除非使用以下方法之一,否则不能直接从 VBA 中的其他工作簿调用过程或函数:
但是,在加载插件时,您可以在其他工作簿的工作表单元格公式中使用插件中的函数。
As far as I know you cannot directly call procedures or functions from other workbooks in VBA unless you use one of the following methods:
You can however utilise functions in the addin in worksheet cell formulas in other workbooks whilst the addin is loaded.