- Home
·
- String Manipulation
·
- search and replace one string with another, will handle multiple instances of search string
search and replace one string with another, will handle multiple instances of search string
search and replace one string with another, will handle multiple instances of search string
Rate search and replace one string with another, will handle multiple instances of search string
(1(1 Vote))
' this code was adapted from someone else's on VBcode
Function RemoveString(Entire As String, Word As String, Replace As String)
Dim I As Integer
I = 1
Dim LeftPart
Do While True
I = InStr(1, Entire, Word)
If I = 0 Then
Exit Do
Else
LeftPart = Left(Entire, I - 1)
Entire = LeftPart & Replace & Right(Entire, Len(Entire) - Len(Word) - Len(LeftPart))
End If
Loop
MsgBox Entire
End Function
search and replace one string with another, will handle multiple instances of search string Comments
No comments yet — be the first to post one!
Post a Comment