ReplaceText

Top  Previous  Next

function ReplaceText(sSource As String, sSearchStr As String, sReplaceStr As String) As String

 

Returns a string in which a specified substring has been replaced with another substring.

 

ReplaceText is case-insensitive.

 

Parameters

 

sSource ... String expression containing substring to replace.
sSearchStr ... Substring being searched for.
sReplaceStr ... Replacement substring.

 

Example:

Dim s

 

= "This is a TEXT"

= ReplaceText(s, "text", "number")

' returns s = "This is a number"