Skip to main content
added 144 characters in body
Source Link
Tomalak
  • 339.4k
  • 68
  • 547
  • 635

In your case, it will produce an error. :-)

Set assigns an object reference. For all other assignments the (implicit, optional, and little-used) Let statement is correct:

Set object = New SomeObject Set object = FunctionReturningAnObjectRef(SomeArgument) Let i = 0 Let i = FunctionReturningAValue(SomeArgument)  ' or, more commonly ' i = 0 i = FunctionReturningAValue(SomeArgument) 

In your case, it will produce an error. :-)

Set assigns an object reference. For all other assignments the (implicit, optional, and little-used) Let statement is correct:

Set object = New SomeObject() Let i = 0 ' or, more commonly ' i = 0 

In your case, it will produce an error. :-)

Set assigns an object reference. For all other assignments the (implicit, optional, and little-used) Let statement is correct:

Set object = New SomeObject Set object = FunctionReturningAnObjectRef(SomeArgument) Let i = 0 Let i = FunctionReturningAValue(SomeArgument)  ' or, more commonly ' i = 0 i = FunctionReturningAValue(SomeArgument) 
Source Link
Tomalak
  • 339.4k
  • 68
  • 547
  • 635

In your case, it will produce an error. :-)

Set assigns an object reference. For all other assignments the (implicit, optional, and little-used) Let statement is correct:

Set object = New SomeObject() Let i = 0 ' or, more commonly ' i = 0