What is the difference between Sub and Function in VB6?

vb6
CodeBlue picture CodeBlue · Apr 13, 2012 · Viewed 66.2k times · Source

I am going through some old VB code and I run into function definitions like these -

 Private Function ExistingCustomer(Index As Integer, Customer As String) As Integer

 Private Sub cmdCustomerList_Click()

What's the difference?

Answer

LeleDumbo picture LeleDumbo · Apr 13, 2012

Function returns value, Sub doesn't. It's that simple.