I have dictionary. Dictionary have array of 8 elements. Can I set new value of existing array in dictionary? My code below:
Option Explicit
Sub test()
Dim dict As Dictionary
Dim arr() As Long
Dim i As Variant
Set dict = New Dictionary
ReDim arr(1 To 8)
dict.Add "L", arr()
dict.Item("L")(3) = 500
For Each i In dict.Item("L")
Debug.Print (i)
Next
End Sub
Line dict.Item("L")(3) = 500 staying array element empty. What I am doing wrong?
Or there is only one true way?
arr(3) = 500
dict.Item("L") = arr