It seems that when an array is passed to a subroutine and changes made there to array elements, the result in the calling code is the same if the array is passed ByVal as when passed ByRef.

This means a different outcome results in the calling code from, say, an integer variable and an integer array with only one element being passed ByVal to a subroutine. Take the following code:

Dim arg(0) as integer
mySub(arg)

Sub mySub(ByVal aa(0) as integer)
aa(0) = 2
End Sub

Back in the calling code, arg(0) = 2 despite the array arg being passed ByVal. If an integer variable had been used instead, the value of the variable in the calling code would remain at zero because it was passed ByVal.

Seems inconsistent?