I\'m facing something weird in VBScript. When writing a procedure where I want the parameter to be passed by reference, the way of calling this procedure changes the way the
It's a feature, not a bug:
http://msdn.microsoft.com/en-us/library/ee478101.aspx
A ByRef parameter is passed by value if the argument is enclosed in parentheses and the parentheses do not apply to the argument list.
The parentheses apply to the argument list if one of the following is true:
The statement is a function call that has an assignment to the returned value.
The statement uses the Call keyword. (The Call keyword can optionally be used for a subroutine call, or for a function call without an assignment.)
So try using the Call keyword or having it return a value.