Understanding Functions


The main difference between functions and subroutines is that function returns a value.
This means that you can use a function name anywhere in the application as though it were the name of a variable. Visual basic runs the function, gets the value assigned to the function and returns the value to the code using the function name.