Return a string from funtion
Sub cmdReturnValues_Click()
Dim strInitials As String
strInitials = ReturnInit("First", "Last")
MsgBox "Your initials are: " & strInitials
End Sub
Function ReturnInit(strFName As String, strLName As String) As String
ReturnInit = Left$(strFName, 1) & Left(strLName, 1)
End Function
Related examples in the same category