I'm currently writing a macro using the MS Project 2003 Visual Basic editor, for which I need to save a path to an template excel spreadsheet. I'd like the user to be able to change the path and for the setting to be persistently saved somewhere.
Is there a convenient location to save persistent data using VBA for MS Project 2003? I was thinking perhaps in a custom field of Global.mpt, but I'm not sure how to access it.
VBA has two built-in functions GetSetting
and SaveSetting
that allow you to simply and safely save persistent string data to the registry. The data is saved in a folder off of the HKEY_CURRENT_USER hive, so the data is saved by user, not by machine.
See here for details: Use the GetSetting and SaveSetting Functions to Read and Write Registry Settings