View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Why doesn't "Resume Next" work?

When the error occurs when the macro is run, the Debug / Exit alert box pops
up, the screen flips to the VBE, and the line highlighted in yellow is the
GetObject line. The WD.Documents.Open line works fine if an instance of
Word is already available. If not, I get the error.

Ed

"impslayer" wrote in message
oups.com...

Ed skrev:

I wrote a macro in Excel 2000 VBA to open a document in Word 2000. I

used
code from the GetObject Help file to check if Word is already active.

But
the code stops on an error generated by using GetObject - "Active X
component can't create object." On Error Resume Next does not drop the

code
through to the next line.

Can someone explain what I have wrong?
Ed


Hi Ed,

Are you sure the error emerges where you think, and not on the
"WD.Documents.Open doc" (which is out of the On Error Resume Next
scope)?

/impslayer