There are two kinds of procedures
It is enclosed by Sub and End Sub statements.
Performs actions but don't return a value.
Can take arguments, if no, include an empty set of parentheses ()
Calling the Procedure
It can be called from
Control's event in the body section of an HTML file.
Passing an Argument
Procedure will take values from outside.
These values are called as “Arguments”.
The number and types of arguments of a procedure depends on various factors.
Enclosed by the Function and End Function statements.
Similar to a Sub procedure, but can also return a value.
Can take arguments, if no, include an empty set of parentheses ().
Return a value by assigning a value to its name in one or more statements of the procedure.
The return type of a Function is always a Variant.