[RESOLVED] read/write registry
Hello. After some search here in vbforum, I decided to use the file "Microsoft Visual Studio\VB98\Template\Code\Registry Access.bas" to read and write values from/to registry.
But I just can't find any simple example for it.
So, I want t read a value from "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup\header"
I've done this:
Code:
Private Sub Command1_Click()
Dim chaveRoot As String, ChaveNome As String
Dim chave As String
Dim x As Variant
chave = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup\header"
chaveRoot = "HKEY_CURRENT_USER"
ChaveNome = "Software\Microsoft\Internet Explorer\PageSetup\header"
x = AcessoReg.GetKeyValue(HKEY_CURRENT_USER, ChaveNome, "")
MsgBox x
End Sub
I'm not getting any value from this key.
What am I missing?
Thank you