View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mary Mary is offline
external usenet poster
 
Posts: 190
Default Problem with RegWrite (Permission)

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\Comm on\Security"
KeyExist = oShell.RegRead(RegistryKey)

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

Cheers,
Mary