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.But how could you make a function that would return all the elements of a multi-dimensional array?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
The function would have to work for any (random) number of dimensions in the array.




Reply With Quote