vba 相当于'this'指针

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3191287/
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 11:51:06  来源:igfitidea点击:

Equivalent of 'this' pointer

vbapointersthis

提问by DenMark

Is there an equivalent of thispointer in VBA so that I can pass it to another module?

thisVBA 中是否有等效的指针,以便我可以将其传递给另一个模块?

回答by Josh

Not for a module, no. A module doesn't have an instance, so there is no instance variable to pass. All the methods are static. If you are within a class instance, however, you can use Me.

不是模块,不是。模块没有实例,因此没有要传递的实例变量。所有方法都是静态的。但是,如果您在类实例中,则可以使用 Me。

回答by Swanny

Try "Me" for classes. Modules are global (like a static class) so have no instance concept.

试试“我”上课。模块是全局的(就像静态类)所以没有实例概念。