End Statement

Ends a procedure or block.

Syntax:

End, End Function, End If, End Select, End Sub

Parametri:

Koristite izjavu End na sljedeći način:

Izjava

End: Nije nužna, ali može biti upisana bilo gdje unutar procedure do kraja izvršavanja programa.

End Function: Ends a Function statement.

End If: Marks the end of a If...Then...Else block.

End Select: Marks the end of a Select Case block.

End Sub: Ends a Sub statement.

Primjer:

Sub ExampleRandomSelect

Dim iVar As Integer

    iVar = Int((15 * Rnd) -2)

    Select Case iVar

        Case 1 To 5

            Print "Number from 1 to 5"

        Case 6, 7, 8

            Print "Number from 6 to 8"

        Case Is > 8 And iVar < 11

            Print "Greater than 8"

        Case Else

            Print "Outside range 1 to 10"

    End Select

End Sub