Public Function WordCount(sSource As String) As Integer 'Returns a count of the words in a string 'Requires Option Base 0 Dim sTmp() As String sTmp = Split(sSource, " ") WordCount = UBound(sTmp) + 1 End Function