我有一段代码似乎没有达到预期的效果。 VBA数组在所有方面都是可变的,但当它们作为某些键的值存储到字典中时,它们似乎不再可变了。 有什么想法吗?
Sub foo()
Dim mydict As New Dictionary
mydict.Add "A", Array(1, 2, 3)
MsgBox mydict("A")(1)
''# The above shows 2, which is fine
mydict("A")(1) = 34
MsgBox mydict("A")(1)
''# The above also shows 2, which is not fine
End Sub