Okay in this program there's a translating part. Sounds pretty simple huh? well this won't work for some reason, and i want you to see what's wrong...

I'm getting it to find each word as it goes along, and i've only had one word put in so far just to test it out, Je ("I" in french)

VB Code:
  1. Dim Length As Integer
  2.     Dim x As Integer
  3.     Dim y As Integer
  4.     Dim word As String
  5.     Dim sentence As String
  6.     Dim xa As String
  7.     Dim ya As String
  8.  
  9.     Private Sub Button1_Click(............) Handles Button1.Click
  10.         sentence = ""
  11.         Length = Len(TextBox1.Text)
  12.         For x = 1 To Length
  13.             xa = Mid(TextBox1.Text, 1, x)
  14.             If xa = " " Then
  15.                 For y = 1 To x Step -1
  16.                     ya = Mid(TextBox1.Text, x, 1)
  17.                     If ya = " " Then
  18.                         word = Mid(TextBox1.Text, y + 1, x - 1)
  19.                         If word = " Je " Then
  20.                             sentence = sentence + " I "
  21.                             TextBox2.Text = sentence
  22.                         End If
  23.                     End If
  24.                 Next
  25.             End If
  26.         Next
  27.     End Sub
  28.  
  29. End Class