set d = createobject("scripting.dictionary")为何不能使用 d.key(d.keys(0))="牛一斤"
Subtest()Setd=CreateObject("scripting.dictionary")d.CompareMode=0'1则不区分大小写,0则区分大小写d.A...
Sub test()
Set d = CreateObject("scripting.dictionary")
d.CompareMode = 0 '1则不区分大小写,0则区分大小写
d.Add "a", ""
d.Add "A", ""
d.Add "张三", "13434544323"
d.Add "李四", "13589898999"
d.Add "王五", "13456565567"
d.Key("王五") = "牛三斤"
d.Key(d.Keys(0)) = "牛一斤" '必须 dim d as new dictionary 才能使用
d.item(d.keys(0)) = "123" '必须 dim d as new dictionary 才能使用
end sub 展开
Set d = CreateObject("scripting.dictionary")
d.CompareMode = 0 '1则不区分大小写,0则区分大小写
d.Add "a", ""
d.Add "A", ""
d.Add "张三", "13434544323"
d.Add "李四", "13589898999"
d.Add "王五", "13456565567"
d.Key("王五") = "牛三斤"
d.Key(d.Keys(0)) = "牛一斤" '必须 dim d as new dictionary 才能使用
d.item(d.keys(0)) = "123" '必须 dim d as new dictionary 才能使用
end sub 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询