ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to handle automation error? (https://www.excelbanter.com/excel-programming/354426-how-handle-automation-error.html)

RB Smissaert

How to handle automation error?
 
Have a .xla add-in and with one user only there is an automation error in
the Workbook_Open event of this
add-in.
The problem is that although there is an error handler
in this procedure it doesn't do anything and all that shows
is the message Automation error, error 440.
How would I catch this error?
This is a new installation of Excel XP. Previously on the same computer with
Excel 9 or 10 there was no
problem.

RBS


K Dales[_2_]

How to handle automation error?
 
Would really need to see the Workbook_Open procedure. Given the fact that
you get an automation error, I am surmising that you are somehow using
another application in your code. If you have set the reference to the
object library in VBA, and it was overwritten or moved in the new install of
XP, that might well explain why the error comes up - and also why it is not
handled by the error handler since this would be picked up as the module is
loaded and compiled, before it is ever run.

Check your references. If they are all OK then check any CreateObject
statements to see if the class that they are referencing still exists (and
check the version numbers for consistency with the new installation).
--
- K Dales


"RB Smissaert" wrote:

Have a .xla add-in and with one user only there is an automation error in
the Workbook_Open event of this
add-in.
The problem is that although there is an error handler
in this procedure it doesn't do anything and all that shows
is the message Automation error, error 440.
How would I catch this error?
This is a new installation of Excel XP. Previously on the same computer with
Excel 9 or 10 there was no
problem.

RBS



RB Smissaert

How to handle automation error?
 
Thanks for making that a bit clearer.
Yes, there are few ActiveX dll files involved and 2 other .xla files.
The problem is probably in one of the other .xla files as that is much more
complex with much more references.
Will report back when I know what the trouble was.

RBS

"K Dales" wrote in message
...
Would really need to see the Workbook_Open procedure. Given the fact that
you get an automation error, I am surmising that you are somehow using
another application in your code. If you have set the reference to the
object library in VBA, and it was overwritten or moved in the new install
of
XP, that might well explain why the error comes up - and also why it is
not
handled by the error handler since this would be picked up as the module
is
loaded and compiled, before it is ever run.

Check your references. If they are all OK then check any CreateObject
statements to see if the class that they are referencing still exists (and
check the version numbers for consistency with the new installation).
--
- K Dales


"RB Smissaert" wrote:

Have a .xla add-in and with one user only there is an automation error in
the Workbook_Open event of this
add-in.
The problem is that although there is an error handler
in this procedure it doesn't do anything and all that shows
is the message Automation error, error 440.
How would I catch this error?
This is a new installation of Excel XP. Previously on the same computer
with
Excel 9 or 10 there was no
problem.

RBS





All times are GMT +1. The time now is 05:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com