How to save program state information in a saved excel file from an application-level add-in?

I am trying to create an Application Layer Add-in for Excel and I would like to preserve certain information about the program state. The information I want to keep is relative to the state of each Excel file (not all Excel files).

+2


a source to share


2 answers


I am using CustomDocumentProperties in the book itself (not the add-in)

http://www.dailydoseofexcel.com/archives/2004/07/16/custom-document-properties/

Then when I open the book, I check for CDP to determine if it belongs to my application, if it is the specific file type my application is using (for context sensitive menu items), and to read the state information for that book.



This link does not show a good example of CDP writing, but I think it looks like

ActiveWorkbook.CustomDocumentProperties.Add ...

      

+1


a source


There is also a CustomProperties that exists at both the workbook level and the worksheet. I used this to store all kinds of information (including information about a serial object) in a book.



+1


a source







All Articles