<< Click to Display Table of Contents >> End (statement) |
End [{Function|If|Sub}]
Stops executing a script or a block of statements.
See also: Exit, Function, If Then Else, Select Case, Stop, Sub
Example:
In this example, the End statement ends the program execution within the routine "Test".
Sub Main
Dim Var1 as String
Var1 = "Hello"
MsgBox "Test"
Test Var1
MsgBox Var1
End Sub
Sub Test(wvar1 as String)
wvar1 = "End"
MsgBox "Program terminated because of the End statement"
End
End Sub