I am trying to use a dynamic 2 dimensional Array to hold the following information
Model - X250 X350 X150
Cell Ref - B2 C3 F3
The size of the array varies dependent upon the models so the array can be 2x2 or 1x2 or even 4x2.
I can hold one item in the array, but I need to hold all the items in the array and be able to change “cell Ref” any time within the array.
I have the following code but its not achieving the above effect
Model - X250 X350 X150
Cell Ref - B2 C3 F3
The size of the array varies dependent upon the models so the array can be 2x2 or 1x2 or even 4x2.
I can hold one item in the array, but I need to hold all the items in the array and be able to change “cell Ref” any time within the array.
I have the following code but its not achieving the above effect
Code:
Dim vMatrix() As Variant
Dim intRow As Integer
Dim intCol As Integer
Dim sMsg As String
For intCol = 0 To 0
For intRow = 0 To 1
ReDim Preserve vMatrix(intCol, intRow) As Variant
vMatrix(intCol, intRow) = strWrkSheetName
Next intRow
ReDim Preserve vMatrix(intCol, intRow) As Variant
vMatrix(intCol, intRow) = "B2"
Next intCol
For intCol = 0 To UBound(vMatrix, 1)
For intRow = 0 To UBound(vMatrix, 2)
sMsg = sMsg & vMatrix(intCol, intRow) & vbTab
Next intRow
sMsg = sMsg & vbCrLf
Next intCol
MsgBox sMsg