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)
What is the difference between Sub and Function in VB6?
"sub" can perform some action. "sub" returns no value.
Example:
Form_Load()
"function" can also perform some action but it also returns some value to point from which it was called. that is, "Functions return a value, often based on a variable"
Example:
Val(), FormatPercentage().