Hi every body
I have a textbox on my form and i want to know how many words i have writen in it.
the idea >> i thought if i declared ( x as string and x =" ") now x equal one space if i can count how many spaces in the textbox i will know how many words in textbox by adding 1 to result of x .
this is my idea but finally any method will help.
by the way if there are any file *.pdf teatch me functions(trim,len.....) i will be thankful.

Comments
Unnecessary font.

Yes, try writing your idea on paper. You would be using looking for spaces, but not just single spaces because words can be separated by more than one space.

Also watch out for tabs etc.

Yes, try writing your idea on paper. You would be using looking for spaces, but not just single spaces because words can be separated by more than one space.

Also watch out for tabs etc.

:D

Hi every body
I have a textbox on my form and i want to know how many words i have writen in it.
the idea >> i thought if i declared ( x as string and x =" ") now x equal one space if i can count how many spaces in the textbox i will know how many words in textbox by adding 1 to result of x .
this is my idea but finally any method will help.
by the way if there are any file *.pdf teatch me functions(trim,len.....) i will be thankful.

why dont you try using textbox1.text.length ?

Comments
Won't work...

first thanks for all, about (textbox1.text.lenght) this method will count litters not words and iam looking for count of word
thanks again

iam sorry (iamthwee) realy i didnot attention about the entire thing,
and thanks (waynespangeler) ur code fantastic
thanks again for all

Comments
This font again...
This article has been dead for over six months. Start a new discussion instead.