Dictionary and saving workbook/ reopening

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
 
T

Tim Williams

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.
 
A

Abe

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
 
N

NickHK

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top