Dim A As Collection Set A = New Collection Dim Arr2(15, 5) Arr2(1,1) = 0 \' ... A.Add (Arr2)
How can I access the Arr2 through
Arr2
Maybe VBA makes a copy of the array when it assigns it to the collection? VB.net does not do this. After this code, a(3,3) is 20 in vba and 5 in vb.net.
Dim c As New Collection Dim a(10, 10) As Integer a(3, 3) = 20 c.Add(a) c(1)(3, 3) = 5