View Single Post
  #2   Report Post  
Harlan Grove
 
Posts: n/a
Default

"PeterH" wrote...
Can anybody tell me what is the best way to determine programatically
from VBA or VB6 whether Excel is installed on the current machine and,
if so, what version.


There's always Registry scanning. Search for the key

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office

Then within this key search for the highest subkey of the form 8.0, 9.0,
10.0, 11.0 (nothing past 11.0 yet) containing an Excel\InstallRoot subkey.
That'd be the newest version installed.

There should also be API function calls to read version tags from .EXE or
..DLL files. You could use them to read the version tag from the Excel
executable, EXCEL.EXE.