Generalised Array Function [RESOLVED]
Here's a poser.
How could you make a function to display all the elements in an array?
It is easy for a 1 dimensional array.
e.g.
VB Code:
Dim intTest(5) As Integer
Dim i As Integer
'Set the values for this example
For i = 1 To UBound(intTest)
intTest(i) = i
Next
For i = 1 To UBound(intTest)
MsgBox intTest(i)
Next
But how could you make a function that would return all the elements of a multi-dimensional array?
The function would have to work for any (random) number of dimensions in the array.