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:<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:
- 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.
- Click Force Quit.
- 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:
- Position your insertion point on the line where you want the code to
stop.
- To toggle the breakpoint on or off, press F9.
- 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:
163435
VBA: Programming Resources for Visual Basic for Applications
Additional query words: OFF98 vba
Keywords: kbprb kbProgramming KB189333
Technology: kbVBASearch kbZNotKeyword3 kbZNotKeyword6