08/11/17 18:38:43
>>288
InStr や Mid を使って自分で書く。多分こう・・・たぶん
Sub eee
foo = "置換したい文字列:りんご"
foo2 = ReplaceStr(foo, "りんご", "みかん")
msgbox foo & chr(10) & foo2
End Sub
Function ReplaceStr( _
sText As String, sSearch As String, sRpleace As String ) _
As String
nPos = InStr(sText, sSearch)
nSearchLen = Len(sSearch)
nReplaceLen = Len(sRpleace)
While nPos <> 0
sText = Mid(sText,1, nPos -1) & sRpleace & Mid(sText, nPos +nSearchLen)
nPos = InStr(nPos +nReplaceLen, sText, sSearch)
WEnd
ReplaceStr = sText
End Function
Replace は 3.x で実装予定。