Restart in VB Break Mode if Delete Blank Line Above End Sub

ID Number: Q78074

1.00

WINDOWS

Summary:

Deleting a blank line above the End Sub/End Function or below the

Sub/Function statement will generate the message

You will have to restart your program

after this edit--proceed anyway?

while in break mode in the VB.EXE environment. This behavior is by

design.

This information applies to Microsoft Visual Basic programming system

1.0 for Windows.

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.

The following steps will 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 DEL 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 above message is also displayed when the cursor is on the second

line and you press the BACKSPACE key once, or if the cursor 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