devxlogo

Trim Multiple Spaces in a String to a Single Space

Trim Multiple Spaces in a String to a Single Space

If a string has two or more consecutive spaces, this will bring them down to a single space.

 Private Function TrimToSingleSpace(strToTrim As String) As StringstrToTrim = Trim(strToTrim)Do Until InStr(1, strToTrim,

devx-admin

Share the Post: