comunication between access 2007 runtime and excel 2003

M

Mauro

I did create a Microsoft Office 2007 Access Database.
There is a procedure in this database that write data onto a Microsoft
Office Excel 2007 Worksheet.
On my PC, in a correctly installed Microsoft Office 2007 situation, it works
correctly
I used Access 2007 developer to distribute the application to a client.
On the client PC there is Microsoft Office 2003 installed
When I try to write datas on Microsoft Office Excel 2007 client’s Worksheet
the program write a runtime error.
The problem is that the database refers to Microsoft Excel 12.0 Object
Library and in the client PC don’t exist (it exist Microsoft Excel 11.0
Object Library)

How can I refer to Microsoft Excel 11.0 Object Library in my source vba code?


This is the vba code I used:
Dim excApp As Object
Dim excDoc As Object
Dim blOpen As Boolean
On Error Resume Next
blOpen = True
Set excApp = GetObject(, "Excel.Application")
If Err.Number = 429 Then
Set excApp = CreateObject("Excel.Application")
blOpen = False
Err.Number = 0

Set excDoc = excApp.Workbooks.Add
 

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