Hi I like to create a number of dictionary objects where the name of the object and also item and value pairs are all in a QTP data table. In essence I would like to get the name of the objects from the table; create an object using the table entry for the object name and then populate it with the data for each object.
To illustrate the point I use an array instead:
I like to create objects whose names are shown in the array below.
objArr = Array("obj1","obj2","obj3","obj4")
For each obj in objArr
execute("Dim " & obj)
set obj = CreateObject(Scripting.Dictionary)
obj.add "item1", "value1" ' <-- these come from table
obj.add "item2", "value2"
This makes "obj" a dictionary object ;whereas I wanted to create dictionary objects named "obj1", "obj2", so on.