Returns the list of key settings and their values from the registry (Variant).
|appname||The name of the application or project (String).|
|section||The name of the section (String).|
|* This function can be used to read registry settings from the following registry path: HKEY_CURRENT_USER\Software\VB and VBA Program Settings\|
* The "appname" is the subkey below the "VB and VBA Program Settings" key.
* The "section" is the subkey of the key specified in the "appname" argument.
* This function returns an uninitialized Variant (Empty) if either appname or section does not exist.
* This function returns Empty if there are no keys below the subkey.
* The returned value is a 2-dimensional array containing keys and values.
* The "appname" on the Macintosh is the filename of the initialisation file in the preference folder in the system folder.
* For more information, refer to the Macros > Registry page.
* The equivalent .NET function is Microsoft.VisualBasic.Interaction.GetAllSettings
* For the Microsoft documentation refer to docs.microsoft.com
Dim vReturned As Variant
vReturned = GetAllSettings("MyApp","MySection")
Msgbox vReturned(0,0) = "MyKey"
Msgbox vReturned(0,1) = "MySettingValue"
vReturned = GetAllSettings("My Amazing Add-in","User Settings")
Msgbox vReturned(0,0) = "Full Name"
Msgbox vReturned(0,1) = "David Smith"
vReturned = GetAllSettings("My Amazing Add-in","Does Not Exist")
Msgbox vReturned = Empty
© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited Top