I have the following code to save the forms position when it is closed, but when it runs through the Reg.bas if errors out on this line:
Code:If rv <> REGISTRY_SUCCESS Then GoTo ErrorHandlerIs there something else I should be doing to make a new entry in the registry.Code:Dim vSubKey As String vSubKey = "Software\Deftech\CodeLibrary\2.0\Config" SaveRegistryValue regLong, hkeyLOCAL_MACHINE, vSubKey, "Left", Me.Left SaveRegistryValue regLong, hkeyLOCAL_MACHINE, vSubKey, "Top", Me.Top SaveRegistryValue regLong, hkeyLOCAL_MACHINE, vSubKey, "Height", Me.Height SaveRegistryValue regLong, hkeyLOCAL_MACHINE, vSubKey, "Width", Me.Width
The app is just for me, so I could manually enter the new keys, but I would like to know how to create them properly.




Reply With Quote