Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Forcing Instantiation of Excel 2003 instead of 2007?

19 views
Skip to first unread message

(PeteCresswell)

unread,
Feb 8, 2012, 1:18:30 PM2/8/12
to
User has both Office 2003 and 2007 installed on his PC - as do I
on my developer box.

In my VBA code, I'm doing:

Set theSS = CreateObject("Excel.Application")

User is getting an instance of 2007, while I am getting an
instance of 2003.

Is there any way for my code to force an instance of 2003 instead
of 2007 without explicitly going the .EXE's path or relying on
some customized registry setting?
--
Pete Cresswell

Bob Barrows

unread,
Feb 8, 2012, 5:46:43 PM2/8/12
to
We had a discussion about this a few weeks back. You might want to search
for it, but I think the upshot was that one needed to make a registry change
to force a specific version to be instantiated. VBA code can write to the
Registry, you know. You don't have to rely on the user to do it.


agiamb

unread,
Feb 9, 2012, 10:06:21 AM2/9/12
to
I think this is the thread
http://www.database-answers.com/microsoft/Access/36416348/excel-two-versions-installed-how-to-instantiate-earlier-version.aspx

--

AG
Email: npATadhdataDOTcom


"Bob Barrows" <reb0...@NOSPAMyahoo.com> wrote in message
news:jguu0q$l9v$1...@dont-email.me...

(PeteCresswell)

unread,
Feb 9, 2012, 11:49:08 AM2/9/12
to
Per agiamb:
My thread even..... I had forgotten about that.

Bottom line seems tb that there is no way to choose which version
of Excel gets instantiated without changing something on the
user's PC.


In my latest go-around, the user reports an intermittent problem.
i.e. sometimes he gets the undesired 2007 but usually 2003.

That suggests to me that there is something else at work - the
user's not telling me the whole story being one possibility.

The immediate prob seems to be that the spreadsheet in question
is getting saved as .XLSX when he creates it with 2007
instantiated and then, later on, when he tries to import it with
2003 instantiated it chokes on the format.

Now that I'm thinking it through, it seems like that is a
straightforward workaround:

- Tweak the "Save" routine to see which version of Excel
is running

- If it is 2007, to force .XLS format.
--
Pete Cresswell

(PeteCresswell)

unread,
Feb 9, 2012, 11:53:06 AM2/9/12
to
Per Bob Barrows:
>We had a discussion about this a few weeks back. You might want to search
>for it, but I think the upshot was that one needed to make a registry change
>to force a specific version to be instantiated. VBA code can write to the
>Registry, you know. You don't have to rely on the user to do it.

It turned out that the CLSID was the same for both versions of
Excel, so one way of resolving the situation was to write the ID
of Excel 2003 to the registry entry in question.

I was tempted, but in the end decided that modifying a user's
registry was a "no-no" when the changes would affect other things
besides my own app.
--
Pete Cresswell
0 new messages