I am trying to store a list from a multi dimensional array in a dictionary using VBA.
The second last line gives a wrong dimension error. I know the keyArray is 2 dimensions but I want to store the first item in keyArray which is a list then so on.
keys is an array which stores the primary keys from my table there isn't any issues with that.
For I = 0 To 15
'Data which should be going in for that key
If I < 8 Then
keyArray(I, 0) = dptData(I)
Else
keyArray(I, 0) = data2(I - 8)
End If
keyArray(I, 1) = keys(I, 0)
keyArray(I, 2) = keys(I, 1)
keyArray(I, 3) = keys(I, 2)
dict.Add keys(I, 0) & " " & keys(I, 1) & " " & keys(I, 2), keyArray(I)
Next I