With
如果我想要对象本身,而不是它的属性/方法,我如何引用我在里面使用的对象?
With ThisWorkbook.Sheets("MySheet")
Call MySub(ThisWorkbook.Sheets("MySheet")) ' works OK, but duplicated
Call MySub(this) ' does not works
.Range(...).Value2 = 1
...
End With
+ 这里的正确术语是什么?我什至不知道如何为此撰写谷歌查询并获得一些有用的结果(因为这with
是一个常用词)......
更新:澄清一下,我在考虑像
with ... as handle
python语法这样的句柄,而不是面向对象的this
关键字