Sub Statement

Defines a subroutine.

Syntax


Sub Name[(VarName1 [As Type][, VarName2 [As Type][,...]])]
blok príkazov
End Sub

Paremetre:

Name: Name of the subroutine.

VarName: Parameter that you want to pass to the subroutine.

Typ: Kľúčové slovo deklarácie typu.

Príklad:


Sub Example
    ' some statements
End Sub