Abundant Technologies - IT Consulting Experts

 Source Code Library

 Code Details

 
Public Function mdl_General_Replace(ByVal strData As String, ByVal strTOFIND As String, ByVal strTOREPLACE As String) Dim varStart As Integer varStart = 1 If InStr(varStart, strData, strTOFIND) > 0 Then Do 'debug.print strData varStart = InStr(varStart, strData, strTOFIND) strData = Mid(strData, 1, varStart - 1) & strTOREPLACE & Mid(strData, varStart + 1) varStart = varStart + Len(strTOREPLACE) Loop Until InStr(varStart, strData, strTOFIND) = 0 End If mdl_General_Replace = strData End Function

Mail To: info@3pc.com