CapitalizeAllWords

Capitalize first letter in all words In a String

Function CapitalizeAllWords(strString)
 Dim arrTemp, strTemp, i
 arrTemp = split(strString, " ")
 For i = 0 To Ubound(arrTemp)
  strTemp = strTemp & " " & ucase(left(arrTemp(i),1)) & lcase(mid(arrTemp(i),2))
 Next
 capAllWords = strTemp
End Function

Parameters

strString

Examples

Write CapitalizeAllWords("we actually Do listen To our users once In a while")

Views 141 Downloads 67

Perm link