Microsoft KB Archive/94167

= FIX: GPF/UAE w/ Stop Command in Event Procedure & Deleted Sub =

Article ID: 94167

Article Last Modified on 1/8/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition

-



This article was previously published under Q94167



SYMPTOMS
In Microsoft Visual Basic version 2.0 for Windows, a General Protection (GP) fault or an Unrecoverable Application Error (UAE) occurs when you attempt to delete a Sub or Function when in break mode. This problem does not occur in Microsoft Visual Basic version 1.0 for Windows.



STATUS
Microsoft has confirmed this to be a problem in Microsoft Visual Basic version 2.0 for Windows. This problem was corrected in Microsoft Visual Basic version 3.0 for Windows.



MORE INFORMATION
The following steps reproduce the problem:

 Run Visual Basic, or if Visual Basic is already running choose New Project from the File menu (ALT, F, N). Form1 is created by default.  Enter one line of code into the Form_Load event procedure of Form1: Stop   In the general section enter the following procedure: Sub YourName '** no code is needed End Sub  From the Run menu, choose Start (ALT, R, S). After execution is stopped, go to the YourName procedure, highlight the entire Sub, and then delete it. You will receive this error: &quot;You will have to restart your program after this edit-proceed anyway?&quot; Choose the OK button.

At this point, a GP fault or UAE occurs.

This problem occurs only when you delete the Sub or Function that you were viewing before you ran the program. If you had been viewing the Form_Load event instead of Sub YourName before running the above program, the problem would not have occurred.

Additional query words: buglist2.00 fixlist3.00 1.00 2.00 3.00 GPF

Keywords: kbbug kbfix KB94167

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.