J
jrpfinch
Please could somebody help me why this code does not work as expected
in Excel 2003:
Sub Test()
Dim dic As Dictionary
Set dic = New Dictionary
dic("Hello") = Array("Zero", "Item1")
Debug.Print dic("Hello")(0)
Debug.Print dic("Hello")(1)
dic("Hello")(1) = dic("Hello")(1) & ",Item2"
Debug.Print dic("Hello")(1)
End Sub
Output:
Zero
Item1
Item1
Thanks
Jon
in Excel 2003:
Sub Test()
Dim dic As Dictionary
Set dic = New Dictionary
dic("Hello") = Array("Zero", "Item1")
Debug.Print dic("Hello")(0)
Debug.Print dic("Hello")(1)
dic("Hello")(1) = dic("Hello")(1) & ",Item2"
Debug.Print dic("Hello")(1)
End Sub
Output:
Zero
Item1
Item1
Thanks
Jon