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

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


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