Sub Statement/text/sbasic/shared/03090409.xhpSub statementSub StatementDefines a subroutine.SyntaxSub Name[(VarName1 [As Type][, VarName2 [As Type][,...]])]statement blockEnd SubParameters:Name: Name of the subroutine.VarName: Parameter that you want to pass to the subroutine.Type: Type-declaration key word.Example:Sub Example ' some statementsEnd Sub