Microsoft KB Archive/189333

= OFF98: Step Into Command For Macro Causes Word To Hang =

PSS ID Number: 189333

Article Last Modified on 12/7/2001

-

The information in this article applies to:


 * Microsoft Visual Basic for Applications

-



This article was previously published under Q189333





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: ': 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 " " to quit. Unsaved changes will be lost. To avoid further problems, restart your computer after you force quit.
 * 1) Click Force Quit.
 * 2) 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.

