You missed a 4th one: Private Function.
Function vs. Sub: A function returns a value from it. A sub does not
return a value. So the choice is of which to use obvious based on if you
need a value returned
Public vs. Private: This is a scope identifier. Public function/subs can be
called from outside the class. Private function/subs can be called only
inside the class. Use private unless you have a reason to make the function
aviable from outside the class. Any function you call such as
String.SubString(...) is marked as public.
Chris
"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:72**********************************@microsof t.com...
I'm new to programming and alot of the tutorials and books i'm looking at
have things like
Public Sub, Private Sub, Public Function, etc what is the difference on
the
3 and when should each one be used?