WD97: Step Into Command For Macro Causes Invalid Page Fault

ID: Q189334

The information in this article applies to:

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:

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.

REFERENCES

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

   ARTICLE-ID: Q163435
   TITLE     : VBA: Programming Resources for Visual Basic for
               Applications

Additional query words: vba ole msgbox wordbasic
Keywords          : kbdta kbwordvba 
Version           : WINDOWS:97
Platform          : WINDOWS
Issue type        : kbbug
Solution Type     : kbnofix

Last Reviewed: July 24, 1998