by John W (7 Submissions)
Category: Registry
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Fri 25th January 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Save and retieve registry settings.
'~~~~~~~~~ THE FOLLOWING DISPLAYS THE VALUE OF THE KEY ~~~~~~~~~
MsgBox "The registry key says: " & GetSetting(App.Title, "MY_SECTION", "MY_KEY", "This is the first time you have ran this code snippet!"), vbExclamation
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'~~~~~~~~~~~ THE FOLLOWING SAVES THE VALUE OF THE KEY ~~~~~~~~~~~
SaveSetting App.Title, "MY_SECTION", "MY_KEY", "The last time this key was saved was at " & Now()
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
End Sub