If the user isn't going to select the word, you can do this, if not, just tweak it a little bit
vb.net Code:
Public Sub DeleteWords() Dim sentence As String = "I'm hot Croatia and I'm bored as hell" Dim words As String() = sentence.Split(New Char() {" "c}) Dim check As Integer = 0 For i As Integer = 0 To words.Count - 1 If words(i) = "Croatia" Then check = i - 1 End If Next For c As Integer = 0 To check MsgBox(words(c) & " ") Next End Sub
Hope it helps![]()






Reply With Quote