Sub Statement/text/sbasic/shared/03090409.xhpSub statementSub StatementDefines a subroutine.Sub Statement diagram[Private | Public] Sub name[(argument1 [As typename][, argument2[char][,...]])] ' statements [Exit Sub] ' statementsEnd Subname: Name of the subroutine.arguments: Optional parameters that you want to pass to the subroutine.