End End Function End If End Property End Select End Sub End Try End With
Parameters
Remarks
When executed, the End statement resets all module-level variables and all static local variables in all modules. To preserve the value of these variables, use the Stop statement instead. You can then resume execution while preserving the value of those variables.
Note The End statement stops code execution abruptly, without invoking the Unload, QueryUnload, or Destruct event, or any other Visual Basic code. Code you have placed in the Unload, QueryUnload, and Destruct events of forms is not executed. Files opened using the Open statement are closed, and memory used by your program is freed. Object references held by other programs are invalidated.
The End statement provides a way to force your program to halt. For normal termination of a Visual Basic program, you should unload all forms. Your program closes as soon as there are no other programs holding references to objects created and no code executing.
Class Statement | Enum Statement | Exit Statement | Function Statement | If...Then...Else Statement | Interface Statement | | Select Case Statement | Stop Statement | Sub Statement | Try ... Catch ... Finally Statement | With Statement