Àðãóìåíòû: strString - ñòðîêà, strFind - ñòðîêà êîòîðóþ íóæíî çàìåíèòü, strReplace - ñòðîêà íà ÷òî ìåíÿåì
Íàçíà÷åíèå: Çàìåíà ñèìâîëîâ â ñòðîêå
Âîçâðàùàåò: Çàìåíÿåò â ñòðîêå strString âñå âõîæäåíèÿ ñòðîêè strFind íà ñòðîêó strReplace
Public Function funChangeString(strString As String, strFind As String, strReplace As String) As String
Dim strFirst As String, strLast As String, strOut As String, intPos As Integer
strOut = strString
If strFind = strReplace Then GoTo lblExit
intPos = InStr(strOut, strFind)
Do Until intPos = 0
strFirst = Left$(strOut, intPos - 1)
strLast = Right$(strOut, Len(strOut) - intPos + 1 - Len(strFind))
strOut = strFirst & strReplace & strLast
intPos = InStr(intPos + Len(strReplace), strOut, strFind)
Loop
lblExit:
funChangeString = strOut
End Function