Forum Discussion
hlalumiere
13 years agoRegular Contributor
Like many (all?) other languages, VBScript has a way of passing objects by reference, ByRef.
Sub Main
DoSomethingWithObject GetObject("SomeName")
End Sub
Function GetObject(ByRef objParent, strObjectName)
Set GetObject = objParent.WaitVBObject(strObjectName)
End Function
Sub DoSomethingWithObject(ByRef objReference)
' Do whatever you like with the object here...
End Sub