Full Version: Access 11.0 and Excel 10.0
UtterAccess Discussion Forums > Microsoft® Access > Access Automation
GRO
Can automation work with these two.
I have a db that works fine except when I installed it on a PC that has office 2003 and excel 2002.
freakazeud
Hi,
what type of automation are you using? Are you using early binding which relies on a reference?
BTW...why would there be a separate Excel version? Excel is part of the Office suite (even the most basic) so either they have Office 2002 and 2003 or just one of the two.
HTH
Good luck
GRO
In the db I created it references Excel 11.0
When installed on the new user's system it had a missing link error. The references had a missing link to Excel 11.0
When unchecked the missing link reference there was no more error but the Excel conversion/save as did not work.
So I had the user check the versions of Excel and it had 2002. But the office was 2003. Not sure what to make of that. the reference for Excel available was 10.0. So I need to get the user to see if 10.0 would work.

Basically what the automation is doing is ...
Get a file that can be opened with Excel (but not an Excel File) and save it as XLS then import it into a table.
HiTechCoach
Oli,

I run into the mixed environment when someone installs a Access 2003 runtime app on a machine that has Office 2002 standard (no Access) already installed. I have a client who has Office 2002 standard then purchased Access 2003 separately. Unfortunately a mixed environment of Office products does happen. I see it the most with non-profits, schools, and government agencies which all have very limited budget and/or depend on handed-down/traded or donated software. I have learned to use, as you suggested, late binding, which works most of the time.
freakazeud
Yes that is understandable with MS Access...but Excel? Excel is part of any Office suite shrug.gif.
freakazeud
Hi,
try to convert your code to late binding so it isn't reference dependent. Than it doesn't matter what version the user's computer supports.
HTH
Good luck
GRO
This is what I'm using...

Dim xlApp As Object
Dim xlSheet As Object
Set xlApp = CreateObject("Excel.Application")
Set xlSheet = xlApp.workbooks.Open(Strpath & strfile).Sheets(1)

What would be the late binding method?

Thanks
Gary
freakazeud
Mhhh...that already looks like late binding. Do you have the Excel Object library set on top of this? You won't need it anymore with that.
HTH
Good luck
GRO
Yes when I removed the reference on my system it did the I got an
error 1004 SaveAs method of workbook calss failed error.

This is the code highlighted:

With xlApp
.ActiveWorkbook.SaveAs Filename:= _
"C:\Folder\NCheck\" & Left(strfile, 8) & ".xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False

Edited by: GRO on Thu Apr 12 11:33:42 EDT 2007.
freakazeud
Hi,
does the file already exist with the same name in the same directory?
HTH
Good luck
GRO
I noticed that after the first attempt to open the db and since the reference to XL 11.0 was missing the code got interrupted. so the excel.application opened but never closed.
So I had the user reference it to 10.0 and reboot the system and it works fine now.
Thanks Oli an Boyd for all your help.
Gary
freakazeud
Glad you got it sorted out.
Good luck on future projects!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.