views:

29

answers:

1

what should be the parameter for create object the following code

dim a
set a=CreateObject("Collection") //getting a runtime error saying ActiveX 
//component can't create object: 'Collection
a.add(CreateObject("Collection"))
a.Items(0).Add(1)
MsgBox(a.Items(0).count)
MsgBox(a.Items(0).Item(0))
+1  A: 

how about a Dictionary

Set a = CreateObject("Scripting.Dictionary")
a.Add 0, "5"
a.Add 4, "10"
MsgBox a.Count
MsgBox a.Item(0)
MsgBox a.Item(4)
Tester101