Private Sub btnCount_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
btnCount.Click
Dim J As Integer
Dim cLast As Integer = txtEntry.TextLength - 1
Dim ThisChar As Char
Dim WordCount As Integer = 0
For J = 0 To cLast
ThisChar = txtEntry.Text.Chars(J)
If ThisChar = " " Then
WordCount += 1
End If