|
-
July 18th, 2001, 04:15 AM
#1
write to registry
hi all,
below are the code that write something to the windows registry.
My intension is to create a new entry under "HKEY_CURRENT_USER\SOFTWARE" with my program folder of MYTEST.
but the code create a new entry under "HKEY_CURRENT_USER\Software\VB and VBA Program Settings". It seem like everthing u get or save is refer "HKEY_CURRENT_USER\Software\VB and VBA Program Settings" directory only.
Am i use the correct function or passing the correct parameter to the function?
thanks in advance!
'mycode
SaveSetting "HKEY_CURRENT_USER\SOFTWARE\MYTEST", "Startup", "Top", 75
SaveSetting "HKEY_CURRENT_USER\SOFTWARE\MYTEST", "Startup", "Left", 50
Debug.Print GetSetting("HKEY_CURRENT_USER\SOFTWARE\MYTEST", section:="Startup", _
Key:="Left", Default:="25")
-
July 18th, 2001, 04:25 AM
#2
Re: write to registry
yap, using Savekey probably doesn't allow you to choose the location. If you need to choose location, you need to use API or alternatively check out http://vblib.virtualave.net, vbRegistry have wrapped the API into a useful class in the activeX DLL.
HTH
cksiow
http://vblib.virtualave.net - share our codes
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|