Im trying to Separate First Name, Middle Initial, and last name into Textboxes, with a function of a button.
Example :
Full Name : Tony J Holley
First Name: Tony
Middle Initial: J
Last Name: Holley
All I have is this, and is for the first name Separator:
' determines the person's first name
Dim name As String
name = txtfullname.Text
txtfirstname.Text = firstname(name)
End Sub
Function firstname(ByVal name As String) As String
Dim firstspace As Integer
firstspace = name.IndexOf(" ")
Return name.Substring(0, firstspace)
I don't know how to separate the middle Initial nor the Last name.
Thanks In Advance.