Storing Settings in the Registry:   Return to List

' To locate Registry Settings saved/recalled with SaveSetting and GetSetting commands.  Execute "RegEdit" and go to "HKEY_CurrentUser ...Software ...VB and VBA Program Settings"

' First example (the full registry setting)
SaveSetting "MyMacro", "BalanceCodes", "StartCodeSetting", "<cite>"

' Second example (setting within a loop and letting the key simply be the increment of the loop)
For i = 0 To UBound(MyFileList())
    SaveSetting "MyMacro", "ActivityChartFiles", Ltrim(Str(i)), MyFileList(i)
Next

' Saving a setting not part of "VB and VBA Program Settings"
System.PrivateProfileString("", _
    "HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Today\Folders", Key) = MyOutlookDirs(2, i)



Note to Webmaster