GetAllSettings Function
Syntax
GetAllSettings(AppName$, Section$)
Group
Description
Obtains all of the Section settings in project AppName. Settings are returned in a Variant. Empty is returned if there are no keys in the section. Otherwise, the Variant contains a two dimension array: (I,0) is the key and (I,1) is the setting. Win16 and Win32 store settings in a .ini file named AppName. Win32/Win64 store settings in the registration database under HKEY_CURRENT_USER\ Software\ VB and VBA Program Settings\ AppName\ Section\ Key. If AppName starts with ..\, VB and VBA Program Settings\ is omitted.
Sandbox
Sandbox mode blocks this function.
Parameters
| Parameters | Description |
|---|---|
| AppName$ | The name of the project which has this Section and Key. |
| Section$ | The name of the section of the project settings. |
Example
Sub Main SaveSetting "MyApp","Font","Size",10 SaveSetting "MyApp","Font","Name","Courier" Settings = GetAllSettings("MyApp","Font") For I = LBound(Settings) To UBound(Settings) Debug.Print Settings(I,0); "="; Settings(I,1) Next I DeleteSetting "MyApp","Font" End Sub