VB, VBA, and VBScript pass arguments by reference by default. A subroutine definition can explicitly override the default by specifying that a parameter should be passed by value. This does raise two issues in the face of late-binding:
Sub Foo(param) param = "Foo"End SubSub AssertValue(actualValue, expectedValue) If actualValue <> expectedValue Then MsgBox "Error! Expected " & expectedValue & " but got " & actualValue End IfEnd SubDim xx = 1Foo xAssertValue x, "Foo"x = 1Foo (x)AssertValue x, 1x = 1Foo x+1AssertValue x, 1