DeleteSetting Instruction

Syntax

DeleteSetting AppName$, Section$[, Key$]

Group

Settings

Description

Deletes the settings for Key in Section in project AppName. Win16 and Win32 store settings in a .ini file named AppName. Win32/Win64 store settings in the registration database in 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 instruction.

Parameters

Parameters Description
AppName$ The name of the project that has this Section and Key.
Section$ The name of the section of the project settings.
Key$ The name of the key in the section of the project settings. If this is omitted, the entire section is deleted.

Example


Sub Main
    SaveSetting "MyApp","Font","Size",10
    DeleteSetting "MyApp","Font","Size"
End Sub