LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 190
Default VBA Modify Registry

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\Commo n\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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
registry subkeycode Erich Neuwirth Excel Programming 0 August 9th 04 09:54 AM
Value from Registry Roy Lasris Excel Programming 3 February 23rd 04 11:53 PM
Registry Tom Ogilvy Excel Programming 1 July 16th 03 01:02 AM
Registry Patrick Molloy[_4_] Excel Programming 0 July 15th 03 12:45 PM


All times are GMT +1. The time now is 06:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"