Microsoft KB Archive/189334

= WD97: Step Into Command For Macro Causes Invalid Page Fault =

Article ID: 189334

Article Last Modified on 1/23/2007

-

APPLIES TO


 * Microsoft Word 97 Standard Edition
 * Microsoft Excel 97 Standard Edition

-



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:

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:


 * 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.

