Whenever you have to interact with users there is information you would like to store outsie the lifetime of an application in order for it to be available at next startup.
The below class can assist in writing and reading property files into hidden temp directories like AppData in Windows systems. This way you can for example store user settings without having to deal with protecting and hiding Excel sheets. I think it is bad style to store information that only rarely is touched by a user in a workbook, which is used to process data. Unless Excel is not used as an interface to configure a lot of different parameters in an application, I use property files.
However the main advantage is that you can use a Scripting.Dictionary internally in the below class in order to ease getting and setting properties by name. This includes the following advantages compared to storing information in Excel files.
- No duplicates possible.
- No handling of indices in Excel sheets necessary.
- Property files are more reliable because Excel sheets are more likely to be modified by users.