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
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