' Replaces the characters set in strUnwanted as spaces
Public Function ReplaceCharacters(ByRef strText As String, _
ByRef strUnwanted As String, ByRef strRepl As String) _
As String
Dim i As Integer
Dim ch As String
For i = 1 To Len(strUnwanted)
' Replace the i-th unwanted character.
strText = Replace(strText, Mid$(strUnwanted, i, 1), _
strRepl)
Next
ReplaceCharacters = strText
End Function
|