Function ReplaceChar(origstring As String, subchar As String, newchar As String) As String Dim szReturn As String ' the modified string to return Dim modstring As String ' inprogress modstring Dim index As Integer ' working variable showing where subchar is or is not in the origstring Dim sublen As Integer ' # of characters length of subchar ' takes an original string (origstring) and replaces all characters of subchar with newchar ' returns the modifed (if subchar was found) string back ' this is modification of the old one stored in the mindwatering support db in that this one supports multiple characters for subchar modstring = origstring sublen = Len(subchar) index = Instr(1, modstring, subchar) If sublen = 0 Then ' we have a nothing subchar so lets just return the original string ReplaceChar = origstring Exit Function End If If (index = 0) Then ' subchar was not found in origstring so we can return the original string ReplaceChar = origstring Exit Function End If While index <> 0 szReturn = Left$(modstring, index - 1) szReturn = szReturn + newchar + Mid$(modstring, index + sublen) modstring = szReturn index% = Instr(1, modstring, subchar) Wend ReplaceChar = szReturn End Function