如何从 Excel VBA 中的模块调用 thisWorkbook 中的方法?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6270852/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-11 13:24:20  来源:igfitidea点击:

How to call a method in thisWorkbook from a module in Excel VBA?

excelexcel-vbavba

提问by user310291

I have a method in thisWorkbook.

我在本工作簿中有一个方法。

I want to call it from an other excel vba module, what's the exact syntax ?

我想从另一个 excel vba 模块调用它,确切的语法是什么?

采纳答案by GSerg

ThisWorkbook.MethodName

Intellisense won't show it though.

不过,Intellisense 不会显示它。