Here is the code for it...
Public Shared Function CountWords(ByVal Text As String) As Integer
Dim Regex As New System.Text.RegularExpressions.Regex("\w+")
Return Regex.Matches(Text).Count
End Function
Private Sub doc_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles doc.TextChanged
Lbl_Characters.Text = Len(doc.Text)
Lbl_Words.Text = CountWords(doc.Text)
End Sub
As you may see...I have Characters and Words, but for some reason I cannot get the lines to count
If I could have any help that would be great. Thankz

New Topic/Question
Reply




MultiQuote




|