GetObject(excel.application) - wrong version launched 
Author Message
 GetObject(excel.application) - wrong version launched

I have two versions of Excel on my machine, Excel97 and Excel5.0 .  When I
use GetObject(excel.application) it opens up Excel97 and I want it to open
Excel5.0 instead.  This application will be used by 10 to 15 different
people (each on a different computer) and the exact locations of the 5.0
version 'excel.exe' will differ from machine to machine, therefore
referencing a specific directory location such as
GetObject("C:\MSOFFICE\EXCEL.EXE") will not work for every person.  Any
suggestions?

Thanks,
Mark Mrachek



Sun, 15 Jul 2001 03:00:00 GMT  
 GetObject(excel.application) - wrong version launched
Hi Mark,

I've heard from folks that I respect that we shouldn't specify the class in
GetObject.  So why not try CreateObject and then open the file?  I don't
know about Excel 5, but in Excel 7 and 8, this should work

Dim objXL as object
    objXL=CreateObject("Excel.Application.7")

    or

    objXL=CreateObject("Excel.Application.5")

If this doesn't work in Excel 5, then try specifying it in GetObject anyways

 GetObejct("XLSFile", "Excel.Application.5")

HTH
--
Dev Ashish (Just my $.001)
---------------
The Access Web ( http://home.att.net/~dashish )
---------------

:I have two versions of Excel on my machine, Excel97 and Excel5.0 .  When I
:use GetObject(excel.application) it opens up Excel97 and I want it to open
:Excel5.0 instead.  This application will be used by 10 to 15 different
:people (each on a different computer) and the exact locations of the 5.0
:version 'excel.exe' will differ from machine to machine, therefore
:referencing a specific directory location such as
:GetObject("C:\MSOFFICE\EXCEL.EXE") will not work for every person.  Any
:suggestions?
:
:Thanks,
:Mark Mrachek



Sun, 15 Jul 2001 03:00:00 GMT  
 GetObject(excel.application) - wrong version launched
Thanks Dev

I will give it a shot!

Mark Mrachek

Quote:

> Hi Mark,

> I've heard from folks that I respect that we shouldn't specify the class in
> GetObject.  So why not try CreateObject and then open the file?  I don't
> know about Excel 5, but in Excel 7 and 8, this should work

> Dim objXL as object
>     objXL=CreateObject("Excel.Application.7")

>     or

>     objXL=CreateObject("Excel.Application.5")

> If this doesn't work in Excel 5, then try specifying it in GetObject anyways

>  GetObejct("XLSFile", "Excel.Application.5")

> HTH
> --
> Dev Ashish (Just my $.001)
> ---------------
> The Access Web ( http://home.att.net/~dashish )
> ---------------


> :I have two versions of Excel on my machine, Excel97 and Excel5.0 .  When I
> :use GetObject(excel.application) it opens up Excel97 and I want it to open
> :Excel5.0 instead.  This application will be used by 10 to 15 different
> :people (each on a different computer) and the exact locations of the 5.0
> :version 'excel.exe' will differ from machine to machine, therefore
> :referencing a specific directory location such as
> :GetObject("C:\MSOFFICE\EXCEL.EXE") will not work for every person.  Any
> :suggestions?
> :
> :Thanks,
> :Mark Mrachek



Sun, 15 Jul 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Getobject (,Excel.Application) without knowing its version number.

2. GetObject("","InternetExplorer.Application") fails in Excel VBA

3. GetObject Excel Application by Word Macro

4. GetObject("","InternetExplorer.Application") fails in Excel VBA

5. Launching An Excel Application, if open then activate

6. GetObject to launch Word

7. Launching Windows 95 applications from your VB application

8. Hi, how can i launch an application using a file of this application

9. use getObject to retrive excel file

10. Excel Add-ins - GetObject err.number=-2147024895

11. GetObject and Excel

12. Opening a Excel book with GetObject function

 

 
Powered by phpBB® Forum Software