Error Message : -2147023067 - Automation Error

V

Vensia

Dear all,

I use the below code to open Excel file. In several computers, I get error
message -2147023067 - Automation Error.
The status of Excel application is active. What causes the error ? Thanks.

Dim objXL As Object
Dim objActiveWkb As Object

On Error Resume Next
Set objXL = GetObject(, "Excel.Application")
If Err.Number <> 0 Then
MsgBox "Run Microsoft Excel application.", vbInformation
Exit Sub
End If

objXL.Workbooks.Open FileName:=Me!txtFileName
If Err.Number <> 0 Then
MsgBox Err.Number & " - " & Err.Description
Exit Sub
End If


Regards,
Vensia
 
B

Barry-Jon

Several computers? Are they the same OS and build? Do they all have
Access / Excel installed? Do they run the same version? At what line
are you getting the error?
 

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