What does the keyword Set actually do in VBA?

前端 未结 7 2534
既然无缘
既然无缘 2020-11-22 04:26

Hopefully an easy question, but I\'d quite like a technical answer to this!

What\'s the difference between:

i = 4

and



        
7条回答
  •  深忆病人
    2020-11-22 04:47

    Off the top of my head, Set is used to assign COM objects to variables. By doing a Set I suspect that under the hood it's doing an AddRef() call on the object to manage it's lifetime.

提交回复
热议问题