patriciaxxx
Programmer
I currently have three single arrays working but I would like to replace them with one 3 dimensional array. I have been trying without success for hours.
Here is the working code for the three arrays:
I need the code to achieve the same thing but using one 3 dimensional array instead of the three arrays I currently have.
I declare 3 global arrays
Private aOne() As Single
Private aTwo() As Single
Private aThree() As Double
I run this once for first size
ReDim aOne(1 To 1)
ReDim aTwo (1 To 1)
ReDim aThree(1 To 1)
I populate the 3 arrays and resize them
aOne(UBound(aOne)) = MyVariableOne
aTwo(UBound(aTwo)) = MyVariableTwo
aThree(UBound(aThree)) = MyVariableThree
ReDim Preserve aOne(1 To UBound(aOne) + 1)
ReDim Preserve aTwo (1 To UBound(aTwo) + 1)
ReDim Preserve aThree(1 To UBound(aThree) + 1)
I retrieve the values
Dim i As Long
For i = LBound(aOne) To UBound(aOne) - 1
msgbox aOne
msgbox aTwo
msgbox aThree
Next