cakirfatih
asked on
String manipulation
hello yall ,
This is really easy.
I have a string that looks like this "ABCDEFG.., ZYPYOYO"
Basically "LastNames" "Comma" "FirstNames" and I would like to seperate the two.
Please provide me with a Function in Visual Basic that can do that.
Thanks in Advance
This is really easy.
I have a string that looks like this "ABCDEFG.., ZYPYOYO"
Basically "LastNames" "Comma" "FirstNames" and I would like to seperate the two.
Please provide me with a Function in Visual Basic that can do that.
Thanks in Advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Private Sub Form_Load()
Dim name As String
Dim LastName As String
Dim FirstName As String
name = "ABCDEFG.., ZYPYOYO"
LastName = Trim(Left(name, InStr(name, ",") - 1))
FirstName = Trim(Mid(name, InStr(name, ",") + 1))
Debug.Print name
Debug.Print LastName
Debug.Print FirstName
End Sub