Dictionary and saving workbook/ reopening

  • Thread starter Thread starter Abraham.Olson
  • Start date Start date
A

Abraham.Olson

If I have a scripting.dictionary object that is declared in a module
and used by a variety of functions in my workbook, and then I save my
workbook and close it, will that dictionary still be around with the
same data in it when I reopen the workbook. If not, how could I make it
so it would?

Thanks in advance,

-Abe
 
The object will go out of scope when you close the workbook containing it.
Depending on what you're storing in the dictionary, you may be able to persist the contents by (eg) writing the string key/value
pairs to a file or worksheet. If you're storing objects in the dictionary then you'd have to persist each object in a storable
format (eg. string) and reccreate the objects when the dictionary is recreated ans populated.
 
That's what I was afraid of, I have picture objects in the
dictionary... but I think I know what I can do to make it work
alright... it just means more coding.
Thanks Tim.
-Abe
 
Abe,
You could have a hidden WB in your XLSTART folder (or use Personal.xls) and
copy the pictures to there. As long you name them so you can retrieve the
correct one later.

NickHK
 
Back
Top