I have the basic string array code down, but i'd like to have 3 columns and X number of rows. So I want it to expand dynamically as I add things to it. How should I append to the multidimensional array?
Code:
Dim yieldTable() As String
Dim blDimensioned As Boolean
Do While Not rst.EOF
Do While Not rst2.EOF
If rst!ID = rst2!ID Then ' If Material/Product ID = YieldTable ID
If blDimensioned = True Then
'Extend array one element larger than current upper bound
ReDim Preserve yieldTable(0 To UBound(yieldTable) + 1) As Integer
Else
'No, so dimensioned it and flag it as dimensioned
ReDim yieldTable(0 To 2) As Integer
blDimensioned = True
End If
yieldTable(UBound(yieldTable) = ' "String 1" "String 2" "String 3" ????
rst2.MoveNext
Loop
rst2.Close
.......
....
Last edited: