MsAccess and Excel versions

B

bruno

I use a VBA Application in MsAccess 2003 that opens an EXCEL 2003 .xlt file.
I had to install the .mdb file on another computer that has MsAcces 2003 but
Excel 2002 and got an error message (in italian) saying no reference found
for Excel v.3.1.

Do I have to upgrade the excel version to 2003 or there's a way to bypass
the problem and maintain the 2002 version?
Thanks.
 
P

Peter Huang [MSFT]

Hi Bruno,

I understand your scenario as below.
You have an Access mdb file, in the mdb file, you will open the VBA editor
to add a reference to the Excel 2003 library and write a macro to
automation Excel to open a Excel file.
If I misunderstood, please let me know.

Commonly COM application is back-compatible. That is to say, an application
built with Excel 2002 will be running correctly on Excel 2003, but we can
not make sure an application built with Excel 2003 will running OK on
previous Excel version.

So for your scenario, an possible workaround is to use LateBinding. That is
to say we did not add a reference to Excel 2003 Library but use it directly.
Here are KBs about how to use Latebinding to automation Excel.
142387 How To Create Excel Chart w/OLE Automation from Visual Basic
http://support.microsoft.com/default.aspx?scid=kb;EN-US;142387

Also through the code is for VB, but it can run under VBA too.,

210129 ACC2000: Applications Run from Automation Do Not Always Close
http://support.microsoft.com/default.aspx?scid=kb;EN-US;210129


Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
B

bruno

Thanks Peter.
actually I don't have directly access to the VBA source code.
I found this problem installing the mdb file on a machine that had Excel
2002 instead of Excel 2003. On another one, with Excel 2003 everythink was
running OK.

So from your response now I know that there are two options:
1 - Get access to the source code and try a LateBinding.
2 - Upgrade to Excel 2003

But I want to give you a more info - in the following day the user upgraded
to Excel 2003 and told me that the operation took a very short time after
which the situation is:
- Every think is running good
- Excel has the same licence as before

What's happend?
 
P

Peter Huang [MSFT]

Hi Bruno,

Based on my understanding, that currently after the EndUser upgrade the
Excel to Excel 2003, some of the EndUser did not encounter the problem.
But some of End Users, they still encounter the problem about "no reference
found for Excel v.3.1".

If I misunderstood, please feel free to let me know.

Can you post a screen shot about the error message?

So far the scenario is that one MDB file copy onto multiple machine which
upgrade from Excel 2002 to Excel 2003. But some are works but the others
did not.
So this may be caused by the specific machine environment.
First I think for the machine still have problems, did the Update
successfully without any error?
Also I think you may try to remove and reinstall Excel 2003, I wonder the
information about Excel 2002 is not correctly upgraded to Excel 2003
version.

Please have a try and let me know the result.

Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
B

bruno

Hi Peter,
the scenario is two standalone machine, everyone with it mdb file. One
machine has Excel 2003 installed (and every think worked immediatly fine) the
second machine has Excel 2002 and encountered the problem. So I suggested an
upgrade to Excel 2003. I don't have access to the VBA code, but this
situation seemes strange.
Then the User called me and sayed that he tryed to upgrade to Excel 2003 but
the job took a very short time. He didn't type any codekey and after that
every think was running good.
We will never know what the User exactly did (he is a competent person),
anyway the actual Excel version on that machine is still Excel 2002 and
everythink work fine.
I suppose the upgrade did some "repair" operation, copying just few
basic/standard files. Is this possible? Is there one or more files that
garantee the compatibility and communication/automation between Access 2003
and Excel 2002?
 
P

Peter Huang [MSFT]

Hi Bruno,

Based on my research, we did not have such a list about the difference
files between Excel 2002 and Excel 2003. And we did not recommend "upgrade"
Excel 2002 to excel 2003 in this way.
Because for an upgrade, we need on only copy/replace the files but also do
many registry operation, we did recommend use Setup program to upgrade.

Also we can programming in Access 2003 to automation Excel 2002. But we did
not recommend install two office products in one machine, so this scenario
selcomly occur that automation accross version.

But provided we use early binding, and we want to automation Excel, we need
to add a COM reference to the according Excel Library, but the Excel 2002
and 2003 have different library which may cause problem in your scenario.
Because the reference may not be refresh to the correct version, especially
we did not recommend programming with a high version but run with a low
version which may cause compatibility issue.

So for your customer's scenario.
1. A recommended approach is that we can access to the VBA code, so that we
can refresh COM reference to Excel 2002 in the Access 2002 applicatoin, so
that scenario is pure Office 2002. So as long as the VBA code did not use
Excel 2003 specific function, this will be OK.
2. Upgrade the Office product to Office 2003, a recommend approach is to
remove Office 2002 installation and do a complete installation of Office
2003.

Since current the scenario is working, your customer may not want to
reinstall a Office 2003, you may keep monitor it if there is any problem,
you may suggest him reinstall the Office 2003.

If you have any other problem, please feel free to let me know.


Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
B

bruno

I completely agree with you and I just requested to uninstall and then
install again Office 2003. Customer is hesitating so your answer gives me
more support on that.
Thanks Peter and have a nice day.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top