PRB: Restart in VB Break Mode If Del Blank Line Above End Sub

Last reviewed: June 21, 1995
Article ID: Q78074
The information in this article applies to:

- Standard and Professional Editions of Microsoft Visual Basic for

  Windows, versions 2.0 and 3.0
- Microsoft Visual Basic programming system for Windows, version 1.0

SUMMARY

While in break mode in the VB.EXE environment, deleting a blank line above the End Sub or End Function or below the Sub or Function statement results in this message:

   You will have to restart your program after this edit--proceed anyway?

STATUS

This behavior is by design.

MORE INFORMATION

Deleting the line following the Sub or Function statement requires you to restart when in break mode. This also occurs when deleting the line preceding the End Sub or End Function statement of any procedure. The Visual Basic edit manager treats both of these deletions as modifications to the first or last lines, both of which require a restart when in break mode.

Steps to Reproduce Behavior

The following steps force a restart in a program while in break mode:

  1. In a new project, choose Start from the Run Menu.

  2. Press CTRL+BREAK to suspend execution of the application and enter break mode.

  3. Press F7, or from the Code menu, choose View Code to bring up the code window.

  4. The text cursor should be on the blank line between the following procedure statements:

       Sub Form_Click ()
    
       End Sub
    
    

  5. Press DELETE to delete the blank line between the Sub Form_Click() and
       End Sub lines.
    
       The following message will be displayed:
    
          You will have to restart your program
          after this edit--proceed anyway?
    
    
The same message is displayed when the insertion point (cursor) is on the second line and you press the BACKSPACE key once, or if the insertion point is at the beginning of the last line of a procedure (at the beginning of the End Sub line) and you press the BACKSPACE key once.


Additional reference words: 1.00 2.00 3.00
KBCategory: kbenv kbprg kbprb
KBSubcategory: EnvtDes


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 21, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.