Try this
VB Code:
Dim strList As String = "-1 HELLO HELLO2" Dim words() As String ' Split text using space as separator words = strList.Split(" ") MessageBox.Show(words(0))
Or you could use try this one
VB Code:
Dim strList as string = ""-1 HELLO HELLO2" MessageBox.Show(strList.Substring(0, strList.IndexOf(" ")))




Reply With Quote