
Determination of the Passing Mechanism
The procedure declaration specifies the passing mechanism for each parameter. The calling code cannot override a ByVal mechanism, but if a parameter is declared with ByRef, the calling code can force the mechanism to ByVal by enclosing the argument name in parentheses in the call.
The default in Visual Basic is to pass arguments by value. You can make your code easier to read by using the ByVal keyword. It is good programming practice to include either the ByVal or ByRef keyword with every declared parameter.