i have a weird way to do it.
Dim intext As String
Dim searchtext As String
Dim replacetext As String
Dim outtext As String
Dim numberfound As Integer
Dim buff() As String
Dim i As Integer
intext = "testl testltesttestltest"
searchtext = "l"
replacetext = "q"
buff() = Split(intext, searchtext, , vbBinaryCompare)
Do Until i = UBound(buff)
outtext = outtext & buff(i) & replacetext
i = i + 1
Loop
__________________
Donate Blood!
"Love is not finding the perfect person, but learning to see an imperfect person perfectly." -Sam Keen
|