Counting words, lines in a text box

Judy

Registered User.
Local time
Today, 16:34
Joined
Sep 26, 2000
Messages
34
I'm trying to count the number of words and lines in a text box but I'm having no luck. Any ideas?

Thanks!
 
The number of "lines" is going to depend on one of two things. You are either going to need to find carriage ejects in the field, and count that, or you are going to arbitrarily pick a line length (that's easy...do a Len() to find the how many characters in the field, then divide by your arbitrary line length and you have the number of lines)

Just for grins, why do you want to know how many lines?
 
It was an excercise in a book I'm studying for VB. The exercise required that I count characters, words and lines in a rich text box. I figured it out using a function for word and line.

Thanks!
 

Users who are viewing this thread

Back
Top Bottom