Sub Statement

Definiuje podprogram.

Składnia

Sub Name[(VarName1 [As Type][, VarName2 [As Type][,...]])]

blok instrukcji

End Sub

Parametry:

Name: Name of the subroutine.

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

Typ: Słowo kluczowe deklaracji typu.

Przykład:

Sub Example

    ' różne instrukcje

End Sub