how to use a substring to separate words in visual basic
I am trying to write a program in visual basic. The user types in a name and then I display the name in two different labels. One label with the first name one with the second, but I do not know how to use the substring method to separate the two words. Into two different strings. So far I have this.
'delcare variables
Dim strfullname As String
Dim strFirst As String
Dim strsecond As String
Dim intfirst As Integer
'assign input to variables
strfullname = Convert.ToString(Me.txtname.Text)
Do Until strfullname = ""
strfullname.Substring(intfirst(“ “), 1)
intfirst = (intfirst + 1)
Loop
strFirst = strfullname.Substring(0, intfirst)
strsecond = strfullname.Substring(intfirst)