Store a value to the users registry (VBA).
Syntax SaveSetting appname:="AppName", Section:="Section", Key:="Key", setting:="Setting" SaveSetting "AppName", "Section", "Key", "Setting" Key AppName The name of the application or project.
Section The name of the section in which the key setting is being saved.
Key The name of the key setting being saved.
Setting The value to which Key is being set (string or number).
All the registry entries will appear under HKEY_CURRENT_USER\Software\VB and VBA Program Settings\
Example
Save a registry key named "LastOrderViewed" with a value of "1375", placing it under the key named "SS64", and a sub key named "DemoDB" (create the keys if they don't already exist):
SaveSetting appname:="SS64", Section:="DemoDB", Key:="LastOrderViewed", setting:=1375
“If you stuff yourself full of poems, essays, plays, stories, novels, films, comic strips, magazines, music, you automatically explode every morning like old faithful. I have never had a dry spell in my life, mainly because I feed myself well, to the point of bursting. I wake early and hear my morning voices leaping around in my head like jumping beans. I get out of bed to trap them before they escape” ~ Ray Bradbury
Related:
DeleteSetting - Delete a value from the users registry
GetSetting - Retrieve a value from the users registry
GetAllSettings - List the keys and values saved in the registry