Search code examples
vbadictionaryexcelsaving-data

Saving VBA Dictionary object in Excel


As part of an Excel Workbook Template a Dictionary object (from the Scripting Runtime Library) is created and added to. Is it possible to save this in some way along with the Workbook such that it is available on starting up the Workbook, or should I just export the data to a worksheet and save it, then reload it in the next time?


Solution

  • I reckon a worksheet is the best bet. You might like to use the very hidden option, which means the sheet can only be made visible by code.

    For example:

     Worksheets("System").Visible = xlVeryHidden