max said:
How do I copy all the contents of one array to another? eg
DestinationArrey()=OriginalArray()
Cant seen to get the syntax right
Please help.
It would depend on how the arrays are declared. If both declarations
are specific as to bounds ...
Dim OriginalArray(10) As <type>
Dim DestinationArray(10) As <type>
.... then I think your only recourse is to loop through the elements of
the arrays and assign them one by one:
Dim I As Integer
For I = LBound(OriginalArray) To UBound(OriginalArray)
DestinationArray(I) = OriginalArray(I)
Next I
However, if the destination array is declared as dynamic ...
Dim DestinationArray() As <type>
then you can write the following assignment statement:
DestinationArray = OriginalArray
That seems to copy all of OriginalArray to DestinationArray.