[英]Excel 2007 vba addin required to be referenced in projects that consume the methods?
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. 我有一个Excel 2007外接程序(带有保存为外接程序的宏的工作簿),似乎需要其他书籍进行引用才能调用它们的方法。
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. 我还将功能区自定义项添加到插件中,并希望确保它们也能正常工作。
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: 据我所知,除非使用以下方法之一,否则无法直接从VBA中的其他工作簿中调用过程或函数:
You can however utilise functions in the addin in worksheet cell formulas in other workbooks whilst the addin is loaded. 但是,在加载外接程序时,您可以在其他工作簿的工作表单元格公式的外接程序中使用函数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.