Question : Find full path of EXCEL.EXE

Dear Experts,
a) Some time ago I got help from another forum to find the path of MSACCESS.EXE.

b) I thought I could replace MSACCESS.EXE with EXCEL.EXE.
and got the following error:  

  "Invalid Root in registry key"

c)  i googled this error and found this link that discusses my error.

 http://www.mail-archive.com/arslist@arslist.org/msg30335.html
 
i went to run/regedit, and see EXEL.EXE, but do not know what to do next or how to modify
the code...

pls advise, thx,
sandra

code:
======
Public Sub GetExcelExeLocation()Dim strBackExcelExeLocation As StringDim WSHShellSet

WSHShell = CreateObject("WScript.Shell")

'Get msaccess path from regkey
strBackExcelExeLocation = WSHShell.RegRead _
                          ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\" _
                          & "App Paths\EXEL.EXE\Path")

End Sub
 

Answer : Find full path of EXCEL.EXE

Was that a typo (EXEL.EXE)?  How about:

strBackExcelExeLocation = WSHShell.RegRead _
                          ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\" _
                          & "App Paths\EXCEL.EXE\Path")
Random Solutions  
 
programming4us programming4us