22 | 02 | 2017

Save/Get Registry Value

You can save users preverences to the registry. You can save installation paths to the registry. Using VBA its a peace of cake. Just use the code below.

Sub WriteReadRegistry()

'***********************************
'**Downloaded from VisibleVisual.com**
'***********************************
'To save values to the registry use the SaveSettings Function Below
SaveSetting "ApplicationName", "SubName", "KeyName", "ValuetoStore"
'Getsettings returns the value from the registry
Dim Value As Variant
'The 4th parameter "" returns a Optional value when no entry is found
Value = GetSetting("ApplicationName", "SubName", "KeyName", "")

End Sub
The KeyValues are stored under "HKEY_CURRENT_USER\Software\VB and VBA Program Settings\Application\SubName\KeyName"
Login

Sign up now and upload your code to the website.

Help us to continue.....
Statistics
Articles View Hits
2174993
Latest Articles