ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to check programmatically if Excel is installed? (https://www.excelbanter.com/excel-programming/439163-how-check-programmatically-if-excel-installed.html)

Claire[_2_]

How to check programmatically if Excel is installed?
 
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



Otto Moehrbach[_2_]

How to check programmatically if Excel is installed?
 
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

"Claire" <replyto@fra wrote in message
...
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


Dave Peterson

How to check programmatically if Excel is installed?
 
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.


Claire wrote:

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


--

Dave Peterson

Claire[_2_]

How to check programmatically if Excel is installed?
 
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

"Claire" <replyto@fra wrote in message
...
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




Dave Peterson

How to check programmatically if Excel is installed?
 
I don't speak the VB. But did you try the createobject() suggestion?

Claire wrote:

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

"Claire" <replyto@fra wrote in message
...
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


--

Dave Peterson

Claire[_2_]

How to check programmatically if Excel is installed?
 
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


"Dave Peterson" wrote in message
...
I don't speak the VB. But did you try the createobject() suggestion?

Claire wrote:

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

"Claire" <replyto@fra wrote in message
...
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


--

Dave Peterson




Mike Middleton

How to check programmatically if Excel is installed?
 
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


"Claire" <replyto@fra wrote in message
...
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


"Dave Peterson" wrote in message
...
I don't speak the VB. But did you try the createobject() suggestion?

Claire wrote:

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

"Claire" <replyto@fra wrote in message
...
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


--

Dave Peterson




All times are GMT +1. The time now is 09:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com