RegistryKey is an ActiveX component for VBA developers. Its purpose is to persist application settings as named strings in the Windows Registry.

You can store a named setting under a named key in the Registry. You can store and retrieve one or more settings for each application, and you can store settings for multiple applications. The Registry data for your settings will look something like this …

Application Settings in the Windows Registry

RegistryKey always stores information in the HKEY_CURRENT_USER\Software hive of the Registry. In the freeware version of the ActiveX it uses the vendor sub-key HKEY_CURRENT_USER\Software\LA Solutions. Under that key, you specify your application IDs. Suppose that you have two applications, Application1 and Application2. You would create two sub-keys …

HKEY_CURRENT_USER\Software\LA Solutions\Application1
HKEY_CURRENT_USER\Software\LA Solutions\Application2

Within each application sub-key, RegistryKey lets you store and retrieve as many named settings as you want. For example, suppose you want to persist a folder location and a settings file for Application1. Your sub-key might have the following data …

Registry Settings for Application1
Key Name Value Type
HKEY_CURRENT_USER\Software\LA Solutions\Application1\Folder C:\Projects\data REG_SZ
HKEY_CURRENT_USER\Software\LA Solutions\Application1\Settings Settings.txt REG_SZ

And here's an example of persistent data for Application2 …

Registry Settings for Application2
Key Name Value Type
HKEY_CURRENT_USER\Software\LA Solutions\Application2\Database C:\Projects\DB\project.udl REG_EXPAND_SZ
HKEY_CURRENT_USER\Software\LA Solutions\Application2\Company ACME Trading Ltd REG_SZ

Q How do I get hold of RegistryKey?

A The RegistryKey ™ ActiveX component is freeware! LA Solutions grants you a zero-cost license to use the software, provided you don't give or sell it to others. We provide a Windows installation that includes example projects for VB and MicroStation VBA developers.

Complete the RegistryKey Request Form. You will be directed to a page where you can download the installation.