ReplaceChars

Replaces all chars found in Chars_to_remove from String1 with Char_to_put
One char (Char_to_put) will be put instead of any char found

CodeFunctionName
What is this?

Public

Tested

Original Work
Function ReplaceChars(String1, Chars_to_remove, Char_to_put)
' Removes all chars found in Chars_to_remove from String1
' Char by char
NewStr = String1
For I = 1 To Len(Chars_to_remove)
NewStr = Replace(NewStr, Mid(Chars_to_remove, I, 1), Char_to_put)
Next
ReplaceChars = NewStr
End Function

String1, Chars_to_remove, Char_to_put

Views 4,462

Downloads 1,455

CodeID
DB ID

ANmarAmdeen
610
Revisions

v1.0

Saturday
May
26
2018