OFF98: Step Into Command For Macro Causes Word To Hang

ID: Q189333


The information in this article applies to:
  • Microsoft Office 98 Macintosh Edition
  • Microsoft Word 98 Macintosh Edition
  • Microsoft Excel 98 Macintosh Edition


SYMPTOMS

When you use the Step Into command to run a Visual Basic for Applications macro line by line in the Visual Basic Editor, you may experience one or all of the following:

  • System stops responding (hangs).

    -or-


  • Screen message- "Microsoft Excel is Waiting for another Application to complete an OLE action."

    -or-


  • Run Time error '-2147418105:<address>': Automation error



CAUSE

These symptoms may occur when you use the Step Into command in the Visual Basic Editor window to run an automation macro that actives a Word dialog object from another application (for example, Microsoft Excel). The dialog box is not visible on screen, which causes the system to hang. The Microsoft OLE Automation extension loses focus of the application that is active in memory and does not activate the Word object on the screen.


WORKAROUND

To cancel the message and restore system functionality on the Macintosh, use the Force Quit command. To do this, follow these steps:

  1. Press COMMAND+OPTION+ESC, to display a message box the reads:

    Force "<application name>" to quit. Unsaved changes will be lost. To avoid further problems, restart your computer after you force quit.


  2. Click Force Quit.


  3. In the Visual Basic Error dialog box, Click End.


To avoid this problem in the future, insert a breakpoint in the code where you want the code to stop, and then run it.

NOTE: If a dialog box is a part of your code, insert the breakpoint after the command.

To do this, follow these steps:

  1. Position your insertion point on the line where you want the code to stop.


  2. To toggle the breakpoint on or off, press F9.


  3. To run the macro, press F5.



STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.


REFERENCES

For more information about getting help with Visual Basic for Applications, please see the following article in the Microsoft Knowledge Base:

Q163435 VBA: Programming Resources for Visual Basic for Applications

Additional query words: OFF98 vba

Keywords : kbdta macword98
Version : MACINTOSH:98
Platform : MACINTOSH
Issue type : kbprb


Last Reviewed: August 13, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.