Sub Statement/text/sbasic/shared/03090409.xhpSub statement
Sub Statement
Defines 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.Subroutines basics