Problem with RegWrite (Permission)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

I put into my Excel Spreadsheet a macro which would modify the registry, but
I seem to be having problems with permission in order to do so. I found that
the code that I have created works for a Windows 2000 machine but it doesn't
work for a Window XP machine where it says that there is a bug on the fifth
line below:
Dim RegistryKey As String
Dim KeyExist As Long
RegistryKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Common\Security"
KeyExist = oShell.RegRead(RegistryKey)

Is there any way around it?
Thanks heaps in advance!!!

Cheers,
Mary
 
Mary,
I do not have that key on my machine, W2K, Office2000.
But I do have:
HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Common\Security

Permissions is another issue.
If you use the Registry API (e.g. RegOpenKeyEx etc) you can set the
permission desired.If the does have that permission, you cannot accept that
branch.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top