I was just thinking about Subs and Functions and this question came to mind: Is there a difference between the two? I'm sure there is but I've never really looked it up... So if you know please enlighten me :)
Printable View
I was just thinking about Subs and Functions and this question came to mind: Is there a difference between the two? I'm sure there is but I've never really looked it up... So if you know please enlighten me :)
The differns between Subs and functions is that a function returns something and the sub does not.
ex.
Function Add( nr1 as Integer, nr2 as Integer) as Integer
Add = nr1 + nr2
End Function
This function return the sum off the two argument (nr1, nr2) so that you can use it in line like this
Total = Add(20,40)