How to do Replace All in Visual Basic
Posted on January 5, 2009
1 2 3 4 5 6 7 8 9 10 11 | 'String Manipulation - How to do Replace All in Visual Basic Function ReplaceAll(ByVal sSource As String, ByVal sFind As String, ByVal sReplace As String) Dim Temp As Variant Temp = Split(sSource, sFind) ReplaceAll = Join(Temp, sReplace) End Function Private Sub Main() MsgBox ReplaceAll("This is the Test Character of Test Paragraph of Test File", "Test", "Live") End Sub |