I'm playing around on how to get last name in the string.
Below is my current code and it is working. I want to know if there is another way to do it.
strMsg = "John Doe"
length = Len(strMsg)
For i = 0 To length
char = Right(strMsg, i + 1)
If Left(char, 1) = " " Then
LastName = Trim(char)
Debug.Print LastName
Exit For
End If
Next i