The array of arrays must be byref
Array declared by DIM, Redim, or Static, cannot be passed by byval. The cause of this error and the solution are as follows:
You have tried to deliver the entire array in a BYVAL. Individual elements in arrays can be passed by byval, but the entire array must be passed by byref. Please note that byref is the default. If you return the caller to prevent the array element from returning the caller, you must pass an array in ByVal, you can pass the array parameters in parentheses, or put it in Variant, and pass this Variant to the Byval parameter, as shown below : Dim myvar as variant myvar = OldArray ()