Quickly Get The Word Count From A TextBox Control
Version Compatibility: Visual Basic 6, Visual Basic Script
These five lines of code take the text from a textBox control and replace duplicate spaces with single spaces. It then splits the text into an array to get the word count.
Instructions: Copy the declarations and code below and paste directly into your VB project.