- Home
·
- String Manipulation
·
- Find and replace any string, text, hyperling,case sensitive option ...anything anywhere ...just 10
Find and replace any string, text, hyperling,case sensitive option ...anything anywhere ...just 10
Find and replace any string, text, hyperling,case sensitive option ...anything anywhere ...just 10 lines of code.Ready Snippet for your
API Declarations
'Just copy and paste in a new form the next code
Rate Find and replace any string, text, hyperling,case sensitive option ...anything anywhere ...just 10
(2(2 Vote))
' Feel free to use this code and come for more code in my page Http://besttops.hypermart.net
' this is marked as a String Handling/Manipulation code
Public Sub RemoveString(Entire As String, Word As String, Replace As String)
Dim I As Integer
I = 1
Dim LeftPart
Do While True
If Check1 Then
I = InStr(1, Entire, Word) 'This is not case-sensitive:
Else
I = InStr(1, UCase$(Entire), UCase$(Word)) 'This is case sensitive
End If
If I = 0 Then
Exit Do
Else
LeftPart = Left(Entire, I - 1)
Entire = LeftPart & Replace & Right(Entire, Len(Entire) - Len(Word) - Len(LeftPart))
End If
Loop
Text1.Text = ""
Text1.Text = Entire
End Sub
Private Sub Command2_Click()
If Text2.Text = "" Then
Exit Sub
End If
RemoveString Text1.Text, Text2.Text, Text3.Text
On Error Resume Next
End Sub
Private Sub Form_Load()
Text1.Text = "Type the word to be Replace in Text2 and in the Text3 the Replace with text. Home page Http://besttops.hypermart.net"
End Sub
Find and replace any string, text, hyperling,case sensitive option ...anything anywhere ...just 10 Comments
No comments yet — be the first to post one!
Post a Comment