VBA - Sub Procedure
VBA - Sub Procedure
Sub procedures DO NOT Return a value while functions may or may not return a value.
Example
Calling Procedures
To invoke a Procedure somewhere in the script, you can make a call from a function. We will not be able
to use the same way as that of a function as sub procedure WILL NOT return a value.
Now you will be able to call the function only but not the sub procedure as shown in the following
screenshot.
Page 2 of 2
The result cell displays ZERO as the area value is NOT returned from the function. In short, you cannot
make a direct call to a sub procedure from the excel worksheet.