Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel.Application Instantiating Different Versions
All,
I have a computer that has multiple versions of MS Excel. How can I instantiate and automate a specific version? I've tried several attempts using the late bound functions, CreateObject and GetObject, but no matter what, I always instantiate the current version. Here is a sample of what I tried Dim obj as Object Set obj = CreateObject("Excel.Application.10") MsgBox obj.Version Set obj = Nothing This code always instantiate the current version in the registry. I suppose I could modify the current version in the registry before instantiating Excel but I would rather not have to do that. I would much rather have something that reads like this pseudo code: Dim obj as Object If (VersionNeeded = 8) Then Set obj = CreateObject("Excel.Application.8") ElseIf (VersionNeeded = 9) Then Set obj = CreateObject("Excel.Application.9") ElseIf (VersionNeeded = 10) Then Set obj = CreateObject("Excel.Application.10") EndIf MsgBox obj.Version Set obj = Nothing Can anyone help me? Thank you, Tom |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel versions | Excel Discussion (Misc queries) | |||
Versions - Is it available in Excel? | Excel Discussion (Misc queries) | |||
excel versions | Setting up and Configuration of Excel | |||
Please include fonts from previous versions ('98) in new versions | Excel Discussion (Misc queries) | |||
Excel Versions | Excel Discussion (Misc queries) |