M
Mary
Hi,
Just need some help, I'm trying to create a new key and dword value in my
registry using VBA (this is due to an annoying error message from ActiveX
component).
The code below is what I have done
Set oShell = CreateObject("WScript.Shell")
strKeyPath = "SOFTWARE\Microsoft\Office\Common\Security"
oShell.CreateKey HKEY_LOCAL_MACHINE, strKeyPath
strKeyPath =
"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Common\Security"
oShell.RegWrite strKeyPath & "UFIControls", "1", "REG_DWORD"
But I get an error in the CreateKey stage...
Does anyone know what's wrong, or a better alternative to the code?
Thanks!
Cheers,
Mary
Just need some help, I'm trying to create a new key and dword value in my
registry using VBA (this is due to an annoying error message from ActiveX
component).
The code below is what I have done
Set oShell = CreateObject("WScript.Shell")
strKeyPath = "SOFTWARE\Microsoft\Office\Common\Security"
oShell.CreateKey HKEY_LOCAL_MACHINE, strKeyPath
strKeyPath =
"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Common\Security"
oShell.RegWrite strKeyPath & "UFIControls", "1", "REG_DWORD"
But I get an error in the CreateKey stage...
Does anyone know what's wrong, or a better alternative to the code?
Thanks!
Cheers,
Mary