No worries - at least you're trying . (Some people seem to expect you to write their projects for them )

The value name is the second parameter "vSubKey" in
vb Code:
  1. RegSetValueEx lngKeyHandle,  vSubKey, 0&, REG_DWORD, 25, 4
which (originally) references
vb Code:
  1. vSubKey = "Software\Deftech\CodeLibrary\2.0"

Actually, I've just spotted a flaw in my previous post . RegSetValueEx expects a pointer to a variable, not the property of the form directly. So to save the values you have to do:

vb Code:
  1. Dim FrmLeft as long
  2. 'etc
  3. 'etc...
  4.  
  5. FrmLeft = Form1.Left
  6. 'etc
  7. 'etc...
  8.  
  9. RegSetValueEx lngKeyHandle, "Left", 0&, REG_DWORD, FrmLeft, 4
  10. 'etc
  11. 'etc...