RunTime Error (Automation Error)

  • Thread starter Thread starter KD
  • Start date Start date
K

KD

Hi,

I have written some vba code that picks up data from an
excel worksheet and creates a new PowerPoint presentation
with the data. The only problem I seem to be getting is
that sometimes (and at different places) I generate a run-
time error. The full error message is as follows :

"RunTime Error '-2147467259 (80004005)' Automation Error"

Asd I said this appears at different places when running
the same macro on the same set of data. Can anyone help
me as it is very frustrating as I cannot really test the
code fully !

Many thanks
KD
 
Hi Tom,

Thanks for the articles - but am having trouble
understanding what they are referring to and indeed how I
might be able to fix the problem - can you help?

Many thanks
KD
 
As the articles say, it is not a specific error - it appears that it is
related to an automation source not being available when you ask it for
something. It isn't something straightforward like
isempty(Range("A1:A10"))
produces a type mismatch error. The only thing I can say is that you need
to analyze your code and try to find where you might cause a condition that
would raise an error. Since you say it jumps around, I would look for
commonality - what is your code trying to do at that point. There is
always the possibility that the error is inaccurate and you have committed
some major error somewhere else in your code that is cause this. For
example, the error Project or Library not found is often triggered when
someone uses a common string function from VBA. The cause is usally a bad
reference; having nothing to do with the line of code specifically.
 
Back
Top