Module
Contents
Index 🔎︎
\<bookmark_value\>Sub statement\</bookmark_value\>

# Sub Statement

Defines a subroutine.

## Syntax

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

    statement block

    End Sub

## Parameters:

Name: Name of the subroutine.

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

\<emph\>Type:\</emph\> Type-declaration key word.

## Example:

    Sub Example

        REM some statements

    End Sub