Syntax
| WordCount(text$)
| ||||
---|---|---|---|---|---|
Description
| Returns an Integer representing the number of words in the specified text.
Words are separated by spaces, tabs, and end-of-lines.
| ||||
See Also
| |||||
Example
| Sub Main
‘This example finds the name “Stuart” in a string
‘and then extracts two words from the string.
s$ = “My last name is Williams; “ & _
“Stuart is my surname.”
i% = WordCount(s$)
MsgBox “’” & s$ & “’ has “ & i% & “ words.”
End Sub
|