How to check programmatically if Excel is installed?

  • Thread starter Thread starter Claire
  • Start date Start date
C

Claire

Hello,
What will be the best way to check if Excel is installed and what is the
name of executable?
Is it always excel.exe?
I think some older version had msexcel.exe, but I can be mistaken.
Your thoughts please,
Claire
 
Claire
By "programmatically" I take it that you mean VBA in Excel. To run any
VBA macro in Excel you must first have to have Excel installed. Or did I
miss something? HTH Otto
 
I would try to start it and if it failed to start, then I know it's not
available.

Are you using VBA or VBS or what?

In VBA:

Dim xlApp As Object
On Error Resume Next
Set xlApp = CreateObject("Excel.Application")
If Err.Number <> 0 Then
Err.Clear
MsgBox "Not there"
Else
MsgBox "yep, it's there"
xlApp.Close
End If
On Error GoTo 0

VBS is pretty much the same--just drop the "as object" in the Dim statement.
 
Sorry, I missed that.
I am programming in old vbasic (ver.6).
My app needs to check if the Excel (any version) is installed on target
computer.
Claire
 
I am not asking about code.
I am asking just in general.
Is anybody in this group able to answer at least this question posted
initially
"
Is it always excel.exe?
I think some older version had msexcel.exe, but I can be mistaken.
"
Claire
 
Claire -
Is it always excel.exe? <

I just checked my own computer(s), and the name of the Excel executable is
excel.exe on all six of these:

Excel 97 SR-2
2000 SP3
2002 SP3
2003 SP3
2007 SP2
2010 Beta

- Mike
http://www.MikeMiddleton.com


I am not asking about code.
I am asking just in general.
Is anybody in this group able to answer at least this question posted
initially
"
Is it always excel.exe?
I think some older version had msexcel.exe, but I can be mistaken.
"
Claire
 
Back
Top