Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to change a new dictionary, old one will keep its value?

Status
Not open for further replies.

shaoxk66

Technical User
Jan 25, 2007
9
CA
i have a dictionary which contains user-defined class items. i need to change the value of these items. each time i change value, the item value in original dictionary will also be changed, and i lost my orignial data. how to solve it?
code like this:
dim olddict as new scripting.dictionary
dim newdict as scripting.dictionary

olddict.add key item(n)
set newdict = olddict
....
then when change items in newdict, olddict changes too. even i add items one by one from olddict, olddict value still changes

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top