B
billbell52
I have a variant array (vVal) that contains an arrays of type single.
In the for loop I (1) redim to 0, (2) extend array by 1, (3)
set value in array. The code I have there is wrong but sort of
shows what I am trying to do.
Dim v1() As Single
Dim v2() As Single
Dim v3() As Single
Dim vKey() As Variant
Dim vVal() As Variant
Dim i As Integer, k As Integer, j As Integer
Dim m As Integer
vKey = Array("VOLTAGES", "TEMPERATURES", "ROWS", "COLS",
"SENSE_AMPS")
vVal = Array(v1(), v2(), v1(), v2(), v3())
' Loop to test access
For i = 0 To UBound(vVal)
ReDim vVal(i)(0) ' Redim to 0
ReDim Preserve vVal(i)(UBound(vVal(i) + 1)) ' Add 1 item to array
vVal(i)(UBound(vVal(i)) = 125 ' Set value
Next i
In the for loop I (1) redim to 0, (2) extend array by 1, (3)
set value in array. The code I have there is wrong but sort of
shows what I am trying to do.
Dim v1() As Single
Dim v2() As Single
Dim v3() As Single
Dim vKey() As Variant
Dim vVal() As Variant
Dim i As Integer, k As Integer, j As Integer
Dim m As Integer
vKey = Array("VOLTAGES", "TEMPERATURES", "ROWS", "COLS",
"SENSE_AMPS")
vVal = Array(v1(), v2(), v1(), v2(), v3())
' Loop to test access
For i = 0 To UBound(vVal)
ReDim vVal(i)(0) ' Redim to 0
ReDim Preserve vVal(i)(UBound(vVal(i) + 1)) ' Add 1 item to array
vVal(i)(UBound(vVal(i)) = 125 ' Set value
Next i