Function RemoveMultipleSpaces(str As String) As String
Try
Dim tmpSTR As String = str
Do While InStr(tmpSTR, " ") > 0
tmpSTR = Replace(tmpSTR, " ", " ")
Loop
RemoveMultipleSpaces = tmpSTR
Catch ex As Exception
RemoveMultipleSpaces = str
End Try
End Function
Validation scripting guide
Back to scripting overview