If the functions in the freely downloadablefile at
http://home.pacbell.net/beban are available to your workbook,
arr6 = MakeArray(arr1, arr2, arr3, arr4, arr5, 1); arr6 will be a one
dimensional array of all the elements of the five arrays
p = UBound(arr1, 1) + UBound(arr2, 1) + UBound(arr3, 1) _
+ UBound(arr4, 1) + UBound(arr5, 1)
q = UBound(arr1, 2)
arr7 = ArrayReshape(MakeArray(arr1, arr2, arr3, arr4, arr5, 1), p, q)
arr7 will be a two-dimensional arrays of the five arrays "stacked on
top" of one another.
Alan Beban
Albert wrote:
Hello and Happy New Year...
I recently created a nice little procedure that "bonds" two arrays toghether
(see below). I now want to make a procedure that bonds a variable number of
arrays (they are all two dimentional and all have the same horizontal
Ubound). For example, sometimes I have to bond only 2 arrays, but sometimes I
may have to bond 5 of them toghether. I haven't been able to figure it out.
Perhaps someone has done something similar or has some ideas?
Thanks in advance,
Albert C
Public RegistrosExistentes() As Variant
Public Const TotalFields = 13
Sub ConstruirArrayRegistrosExistentes(Arr1, Arr2)
ReDim RegistrosExistentes(1 To (UBound(Arr1, 1) + UBound(Arr2, 1)), 1 To
TotalFields)
For x = 1 To UBound(Arr1, 1)
For Y = 1 To TotalFields
RegistrosExistentes(x, Y) = Arr1(x, Y)
Next Y
Next x
For x = 1 To UBound(Arr2, 1)
For Y = 1 To TotalFields
RegistrosExistentes(UBound(Arr1, 1) + x, Y) = Arr2(x, Y)
Next Y
Next x
End Sub