In the click event of the button that you want to count words, place something like this:
VB Code:
MsgBox CountWords(myTextbox.text) & " words in document"
or to place them in a variable,
VB Code:
dim x as integer x = CountWords(myTextbox.text) msgbox("There are " & x & " words in this document")




Reply With Quote