Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Open specific version of Excel

I want to get or create a referenced instance of all other versions of Excel
that might exist, besides the current running version.

Set xl = CreateObject("Excel.Application.8")

The above picks up the default version, not necessarily XL97.

I can get full path's to Excel.exe versions by reading the registry from
....Office\version\Excel\InstallRoot\
but following fails entirely (even if an instance of the version in sPath is
running).

Set xl = Getobject(sPath & "Excel.exe")

Any ideas appreciated,
Peter T

PS, this question has been asked before but not answered, at least not that
I've been able to find.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default Open specific version of Excel

You can use the clsid to try the different versions.

Untested, but it would go something like this

Dim oXL as object

'excel 10, clsid from
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Excel.Applicat ion\CLSID
on error resume next
Set oXL = GetObject("clsid:00024500-0000-0000-C000-000000000046")
on error goto 0
if not oXL is nothing then msgbox "excel 10 installed"
set oXL = nothing

Robin Hammond
www.enhanceddatasystems.com

"Peter T" <peter_t@discussions wrote in message
...
I want to get or create a referenced instance of all other versions of
Excel
that might exist, besides the current running version.

Set xl = CreateObject("Excel.Application.8")

The above picks up the default version, not necessarily XL97.

I can get full path's to Excel.exe versions by reading the registry from
...Office\version\Excel\InstallRoot\
but following fails entirely (even if an instance of the version in sPath
is
running).

Set xl = Getobject(sPath & "Excel.exe")

Any ideas appreciated,
Peter T

PS, this question has been asked before but not answered, at least not
that
I've been able to find.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Open specific version of Excel

Hi Robin,

Thanks for responding. At first glance that looked very promising. However
it appears that the CLSID value for each version is identical. I have -

HKEY_LOCAL_MACHINE\SOFTWARE\Classes
\Excel.Application\CLSID
\Excel.Application.8\CLSID
\Excel.Application.9\CLSID
etc

each has the same ID string value, namely -
"00024500-0000-0000-C000-000000000046"

I tried the method you suggested in anticipation it would at least get or
create an instance, probably the current version. But it failed completely.

I might be missing something obvious so I will keep looking,

Regards,
Peter T


"Robin Hammond" wrote in message
...
You can use the clsid to try the different versions.

Untested, but it would go something like this

Dim oXL as object

'excel 10, clsid from
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Excel.Applicat ion\CLSID
on error resume next
Set oXL = GetObject("clsid:00024500-0000-0000-C000-000000000046")
on error goto 0
if not oXL is nothing then msgbox "excel 10 installed"
set oXL = nothing

Robin Hammond
www.enhanceddatasystems.com

"Peter T" <peter_t@discussions wrote in message
...
I want to get or create a referenced instance of all other versions of
Excel
that might exist, besides the current running version.

Set xl = CreateObject("Excel.Application.8")

The above picks up the default version, not necessarily XL97.

I can get full path's to Excel.exe versions by reading the registry from
...Office\version\Excel\InstallRoot\
but following fails entirely (even if an instance of the version in

sPath
is
running).

Set xl = Getobject(sPath & "Excel.exe")

Any ideas appreciated,
Peter T

PS, this question has been asked before but not answered, at least not
that
I've been able to find.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open excel file in 2007 version A. J Excel Discussion (Misc queries) 6 April 10th 09 10:00 PM
An Excel File Cannot be Open in Xp 2002 version... Angel Excel Discussion (Misc queries) 1 March 14th 06 02:31 PM
How do i open a file in a new version of Excel Rik Connors Excel Discussion (Misc queries) 1 June 24th 05 04:28 AM
Can't use "Open With" Excel, my version is registered but does no. times99 Setting up and Configuration of Excel 4 March 16th 05 07:42 PM
How do I open each workbook in it's own version of Excel? RKOCT Excel Discussion (Misc queries) 3 December 8th 04 11:32 PM


All times are GMT +1. The time now is 03:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"