How to handle automation error?

  • Thread starter Thread starter RB Smissaert
  • Start date Start date
R

RB Smissaert

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

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

Back
Top