WD97: Step Into Command For Macro Causes Invalid Page Fault (189334)
The information in this article applies to:
- Microsoft Word 97 for Windows
- Microsoft Excel 97 for Windows
This article was previously published under Q189334 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 receive the
following error message:
This program has performed an illegal operation and will be shut down.
When you click Details, the following message appears:
Excel caused an invalid page fault in module OLEAUT32.DLL at
0137:<address>
NOTE: If you can successfully run the code with the Run command, you can
ignore the error message.
CAUSE
This problem occurs when the following conditions are true:
- You use the Step Into command (F8) with the Visual Basic Editor window
open.
-and-
- You are running an automation macro that actives a Word dialog
object from another application (for example, Microsoft Excel).
This problem occurs because the Oleaut32.dll file loses focus of which
application is active in memory.
WORKAROUND
To work around this problem, insert a breakpoint in the code where
you want the code to stop, and then run it. 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
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbbug kbnofix kbProgramming KB189334 |
---|
|