Mega Code Archive

 
Categories / VisualBasic Script / Language Basics
 

A function returns a value to whomever called it We can recast the previous sub into a function as follows

Function concat() As String     Dim strFirstname As String     Dim strLastName As String     Dim strFullName As String     strFirstname = "John"     strLastName = "Smith"     strFullName = strFirstname & " " & strLastName     concat = strFullName End Function