Difference between method and function !!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Atran
    Contributor
    • May 2007
    • 319

    Difference between method and function !!!

    What is Difference between method and function !!!
    Thanks.
  • kadghar
    Recognized Expert Top Contributor
    • Apr 2007
    • 1302

    #2
    A function is a method;

    There are two kind of methods, de Sub and the Function. A sub wont give you a value in return. A function could do it.

    i.e.

    Sub MyFirstSub(you can optionally put here an input)
    Command1.Captio n = "Click here"
    End Sub

    Public Function Sum(A, B as Double)
    Sum = A + B
    End Function
    **that way Sum(2,3) is the same as writing 5

    I hope this is not a bad joke (like the difference between the toilet paper and the shower towel), and if it is, i hope you're not laughing 2 loud.

    Comment

    Working...