Storing Values in a Windows Registry with VB

Storing Values in a Windows Registry with VB

The following code allows you to permanently store values in a Windows registry and retrieve them later:

SaveSetting appname:="ABCX", Section:="Startup", Key:="samp", setting:="Y"

You can either check in the Windows registry (search for key ABCX) or you can directly visit:

 HKEY_CURRENT_USER/Software/VB and VBA Program Settings/ABCX/Startup(Windows 98 )

Retrive the key value using the following code:

sampkey = GetSetting(appname:="ABCX", Section:="Startup", Key:="samp")

Delete the key using this code:

DeleteSetting appname:="ABCX", Section:="Startup, Key:="samp"
See also  Essential Measures for Safeguarding Your Digital Data

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist