Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Open excel file in 2007 version | Excel Discussion (Misc queries) | |||
An Excel File Cannot be Open in Xp 2002 version... | Excel Discussion (Misc queries) | |||
How do i open a file in a new version of Excel | Excel Discussion (Misc queries) | |||
Can't use "Open With" Excel, my version is registered but does no. | Setting up and Configuration of Excel | |||
How do I open each workbook in it's own version of Excel? | Excel Discussion (Misc queries) |