Set Statement

Sets an object reference on a variable or a Property.

āļšāˇāļģāļš āļģ⎓āļ­āˇ’āļē:

Set ObjectVar = Object

āļ´āļģāˇāļ¸āˇ’āļ­āˇ“āļąāˇŠ:

ObjectVar: a variable or a property that requires an object reference.

Object: Object that the variable or the property refers to.

Nothing - Assign the Nothing object to a variable to remove a previous assignment.

āļ‹āļ¯āˇāˇ„āļģāļĢāļē:

Sub ExampleSet

Dim oDoc As Object

    Set oDoc = ActiveWindow

    Print oDoc.Name

End Sub