I met the case that array parameter passing failed.
My testing code is as following:
Option Base 1
Sub test(ParamArray array1() As Variant)
MsgBox "Ubound(array1) is " & UBound(array1)
End Sub
Sub main()
Dim array2(2) As String
array2(1) = "ABC"
array2(2) = "BCD"
MsgBox "Ubound(array2) is " & UBound(array2())
test(array2)
End Sub
I run subroutine main. The result is that:
Ubound(array2) is 2
Ubound(array1) is 0
Seems that array2 is not passed to subroutine test.
Could you help me with it?
My testing code is as following:
Option Base 1
Sub test(ParamArray array1() As Variant)
MsgBox "Ubound(array1) is " & UBound(array1)
End Sub
Sub main()
Dim array2(2) As String
array2(1) = "ABC"
array2(2) = "BCD"
MsgBox "Ubound(array2) is " & UBound(array2())
test(array2)
End Sub
I run subroutine main. The result is that:
Ubound(array2) is 2
Ubound(array1) is 0
Seems that array2 is not passed to subroutine test.
Could you help me with it?