A subroutine and a function are practically the same thing. The only
difference is that a function returns something.
Example:
Public Sub AddNumbersSubroutine(x as integer, y as integer)
Debug.WriteLine(x + y)
End Sub
Public Function AddNumbersFunction(x as integer, y as integer) as integer
Return x + y
End Function
Then, in another part of your program, you can either say:
Call AddNumbersSubroutine(10, 32)
Or, you can say:
Dim myValue as Integer
myValue = AddNumbersFunction(10, 32)
Hope this helps.
-Jason
"Nocturnal" <an*******@discussions.microsoft.com> wrote in message
news:uV**************@TK2MSFTNGP10.phx.gbl...
What is a function, how do you pass something to a function? Can anyone
elaborate on this for me? I'm rather new to programming.