Debug.print Replace("abababa", "a", "")
This is nice when you only have a single character that you want removed, but if you have a long list of suspects, you will have to do some serious copy and paste. You can avoid that by using the following function:
public Function StripOut(From as string, What as string) as string Dim i as Integer StripOut = From for i = 1 to len(What) StripOut = Replace(StripOut, mid$(What, i, 1), "") next i End Function
Just place it somewhere in your code (preferably in a module), and call it like this:
Debug.print StripOut("abcdefg", "bdf")
This will return a string that had all of its 'b', 'd', and 'f' characters removed.