Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
GetObject-question
Hi
I have installed four Excel versions on my pc (97, 2000, XP & 2003). I have written an external vba script, that opens an Excel instance. Now I'd like to test my script with 97, but the script always opens Excel 2003. I'm using the following comand: On Error Resume Next Set oXL = GetObject(, "Excel.Application.8") If Err.Number < 0 Then Set oXL = CreateObject("Excel.Application.8") End If On Error GoTo 0 oXL.Visible = True Any ideas how to open Excel 97? Many thanks in advance! Tom |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
GetObject-question
Use the shell command and point it to the proper executable, then perhaps
you can get a reference to it using the caption. GetObject will always use the last registered version - so an alternative would be to reregister xl97, but that probably isn't advisable. -- Regards, Tom Ogilvy "Tom" wrote in message ... Hi I have installed four Excel versions on my pc (97, 2000, XP & 2003). I have written an external vba script, that opens an Excel instance. Now I'd like to test my script with 97, but the script always opens Excel 2003. I'm using the following comand: On Error Resume Next Set oXL = GetObject(, "Excel.Application.8") If Err.Number < 0 Then Set oXL = CreateObject("Excel.Application.8") End If On Error GoTo 0 oXL.Visible = True Any ideas how to open Excel 97? Many thanks in advance! Tom |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 Macro/VB Question DDE Question | Excel Worksheet Functions | |||
Controlling Reflection1 from Excel using getObject | Excel Programming | |||
Invoking Excel via Getobject(From Access) to invoke Excel Macro | Excel Programming | |||
Is there a better option than Getobject to access a .xls? | Excel Programming | |||
Excel Getobject error | Excel Programming |