Sub testtesttest()
Dim d '创建一个变量
'创建Mpp外部对象,将对象实例置变量d中
Set d = CreateObject("Stock.MapValue")
'创建完Map对象后往其内部插入3个数据
call d.SetKey("1",123.5)
call d.SetKey("3","你好")
call d.SetKey("2",1000)
'取键值为2的数据并打印下来
Dim DataVal
Result = d.GetValue("3",DataVal)
'此处原来是"2"
If result = 1 Then
Application.MsgOut DataVal
End IF
'释放对象
set d = nothing
End Sub
------------------------------------------------
此例子是金字塔vba帮助里找的,稍修改一下,红字那里原来是“2”,可通过。改成“3”,则金字塔非法死掉
何解???