|
|
Function is similar to a sub procedure but the main purpose of the function is to accept certain input and return a value. The value is then passed to the main procedure to finish the execution. As in stand alone VB6, you can create functions in MS Excel VB editor. The general format of a function is Function functionName(Arg as dataType,.........) As dataType Statements End Function In the example below, the user can specify a certain number in a certain range and count the total number of that number.
|