> Yes, it literally says method '~' of object '~' failed. Definitely the
> worst error message I have ever encountered.
There sure isn't much room for making it more useless.
I plugged the exact error string you give below (thanks for typing it verbatim) into
Google and got a fair number of hits, most of which seem database releated (SQL, MDAC and
the like). Nothing connected to PPT directly, so no bells are going off at this end.
You might want to do the same to see if anything triggers the Aha experience for you.
>
> Thanks,
> Jeff
>
> "Steve Rindsberg" wrote:
>
> > In article <DECA708F-EA25-4534-8D01-(E-Mail Removed)>, Trooper665 wrote:
> > > There is error handling in the subroutine that this code is in, but the error
> > > doesn't get handled there. When the error actually raises this is the
> > > message: Error number: - 2147417851 method '~' of object '~' failed. Which
> > > isn't very helpful. Hope that makes sense.
> >
> > It literally says " method [tilde character]"?
> > If not, what are the specific objects and methods mentioned?
> >
> > >
> > > Thanks,
> > > Jeff
> > >
> > > "Steve Rindsberg" wrote:
> > >
> > > > In article <3D1D4F60-EFF3-407D-9CB1-(E-Mail Removed)>, Trooper665
> > > > wrote:
> > > > > Unfortunately, the error doesn't seem to be trappable. This problem is
> > > > > really driving me nuts. The DoEvents suggestion didn't work either.
> > > >
> > > > Hmm. Then to be more precise, it doesn't raise an error in the usual VB/VBA
> > > > sense, else it would be trappable, but it throws up some kind of error message
> > > > box? What's the specific error message?
> > > >
> > > >
> > > > >
> > > > > Thanks,
> > > > > Jeff
> > > > >
> > > > > "Brian Reilly, MVP" wrote:
> > > > >
> > > > > > I ran into a similar error years ago which would randomly throw an
> > > > > > error like this. I never did figure it out but the workaround was to
> > > > > > capture the error and go to the errorhandler and verify the error
> > > > > > number and if it was this error to go back and try again. Something
> > > > > > like (not tested, just typing logic here)
> > > > > >
> > > > > > Sub test()
> > > > > > On Error GoTo errorhandler
> > > > > > TryAgain:
> > > > > > MsgBox "Error" 'just to
> > > > > > 'some code that might throw this error
> > > > > >
> > > > > > Exit Sub
> > > > > >
> > > > > > errorhandler:
> > > > > > Select Case Err
> > > > > > Case Is = 42 'the Err value
> > > > > > GoTo TryAgain
> > > > > > Case Else
> > > > > > Exit Sub
> > > > > > End Select
> > > > > > End Sub
> > > > > >
> > > > > > Brian Reilly, MVP
> > > > > >
> > > > > >
> > > > > > On Fri, 30 Sep 2005 09:55:05 -0700, "trooper665"
> > > > > > <(E-Mail Removed)> wrote:
> > > > > >
> > > > > > >In Office 2000 this code worked perfectly:
> > > > > > >
> > > > > > >Dim xlCurrChart As Excel.Chart
> > > > > > >Dim xlBook As Excel.Workbook
> > > > > > >Dim pptShape As PowerPoint.Shape
> > > > > > >
> > > > > > >Set pptShape = rpptTarget.Shapes.AddOLEObject(Width:=fDefaultWidth,
> > > > > > >Height:=fDefaultHeight, ClassName:="Excel.Sheet")
> > > > > > >
> > > > > > >Set xlBook = pptShape.OLEFormat.Object
> > > > > > >Set xlCurrChart = xlBook.Charts.Add()
> > > > > > >
> > > > > > >But now testing this with Office 2003, the last line raises an error. The
> > > > > > >weird thing is that this code is in a loop and the error is only raised the
> > > > > > >first time that this code fires. After the first loop, the code no longer
> > > > > > >raises any errors and works fine.
> > > > > > >
> > > > > > >Any ideas?
> > > > > >
> > > > >
> > > >
> > > > -----------------------------------------
> > > > Steve Rindsberg, PPT MVP
> > > > PPT FAQ: www.pptfaq.com
> > > > PPTools: www.pptools.com
> > > > ================================================
> > > >
> > > >
> > > >
> > >
> >
> > -----------------------------------------
> > Steve Rindsberg, PPT MVP
> > PPT FAQ: www.pptfaq.com
> > PPTools: www.pptools.com
> > ================================================
> >
> >
> >
>
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:
www.pptfaq.com
PPTools:
www.pptools.com
================================================