Sub Procedures
A Sub procedure is a series of BSL statements (enclosed by Sub and End Sub statements) that perform actions but don't return a value. A Sub procedure can take arguments (constants, variables, or expressions that are passed by a calling procedure). If a Sub procedure has no arguments, its Sub statement must include an empty set of parentheses ().
The following example illustrates the use of the sub procedures:
Example
Sub CalculateArea()
Dim length, width, area
length = 5
width = 4
area = length * width ' Calculates the area of the rectangle.
'The area of the rectangle is 20
End Sub
Call CalculateArea()