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
Equivalent of 'this' pointer
提问by DenMark
Is there an equivalent of this
pointer in VBA so that I can pass it to another module?
this
VBA 中是否有等效的指针,以便我可以将其传递给另一个模块?
回答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.
试试“我”上课。模块是全局的(就像静态类)所以没有实例概念。