A function returns a value to whomever called it. We can recast the previous sub into a function as follows: : Function « Language Basics « VBA / Excel / Access / Word
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