a.) created one file and saved(a.vbs)with following lines of code.
Set objdict = CreateObject("Scripting.Dictionary")
objdict.Add "1", "K"
objdict.Add "2", "V"
objdict.Add "3", "N"
Now I want to check the number of Items or keys in objdict in another b.vbs file. I mean to say I want to use the same reference(objdict)and perform the different operation add, remove etc.
Please let me know how can we do this.
Re: How to use a object reference in different.vbs
You could use the File System Object and read the contents of the first vbs file using the ReadAll command. Then use the ExecuteGlobal statement. This shall enable you to use the same dictionary object declared in the first vbs file.