Public Function GetAllWordsAsCollection(ByVal strPhrase As String, Optional strDelimiter As String = " ") As VBA.Collection Dim col As VBA.Collection Dim strTemp As String Dim intPos As Integer Set col = New VBA.Collection strPhrase = Trim(strPhrase) If Right(strPhrase, 1) = strDelimiter Then strPhrase = Left(strPhrase, Len(strPhrase) - 1) strPhrase = Trim(strPhrase) Do While Len(strPhrase) > 0 intPos = InStr(1, strPhrase, strDelimiter) If intPos = 0 Then If Len(strPhrase) > 0 Then col.Add strPhrase strPhrase = "" Else Set col = Nothing GoTo Proc_Exit End If Else 'intPos > 0 strTemp = Trim(Left(strPhrase, intPos - 1)) col.Add strTemp strPhrase = Trim(Mid(strPhrase, Len(strTemp) + 1)) End If If Left(strPhrase, 1) = "," Then strPhrase = Mid(strPhrase, 2) strPhrase = Trim(strPhrase) Loop Proc_Exit: If col.Count > 0 Then Set GetAllWordsAsCollection = col End Function