What does the keyword Set actually do in VBA?

前端 未结 7 2408
既然无缘
既然无缘 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:57

    Set is an Keyword and it is used to assign a reference to an Object in VBA.

    For E.g., *Below example shows how to use of Set in VBA.

    Dim WS As Worksheet

    Set WS = ActiveWorkbook.Worksheets("Sheet1")

    WS.Name = "Amit"

提交回复
热议问题