End Statement

 

End[{Function | If | Sub}]

 

Ends a program or a block of statements such as a Sub procedure or a function.

             

              Related Topics: Exit, Function, If...Then...Else, Select Case, Stop

 

Example:

 

Sub Main()

 

   Dim Var1 as String

 

   Var1 = "hello"

   MsgBox " Calling Test"

   Test Var1

   MsgBox Var1

 

End Sub

 

Sub Test(wvar1 as string)

 

   wvar1 = "goodbye"

   MsgBox "Use of End Statement"

   End

 

End Sub