HI
I make Text1 it contain this Words:
i need code to find (Mustafa and Omar & IYAD) and delete them ????PHP Code:IYAD OMAR Hassan Mustafa
ZYAD OMAR Hassan Mustafa
AHMED OMAR Hassan Mustafa
KHALED OMAR Hassan Mustafa
Printable View
HI
I make Text1 it contain this Words:
i need code to find (Mustafa and Omar & IYAD) and delete them ????PHP Code:IYAD OMAR Hassan Mustafa
ZYAD OMAR Hassan Mustafa
AHMED OMAR Hassan Mustafa
KHALED OMAR Hassan Mustafa
...:wave:vb Code:
Text1.Text = Replace(Text1.Text, "Mustafa", "", , , vbTextCompare) Text1.Text = Replace(Text1.Text, "Omar", "", , , vbTextCompare) Text1.Text = Replace(Text1.Text, "IYAD", "", , , vbTextCompare)
If you only want to remove a specific casing of the word(s) just remove the , , , vbTextCompareCode:Dim S As String, RS As String
S = Text1.Text
RS = Replace(S, "Mustafa", vbNullString, , , vbTextCompare)
RS = Replace(RS, "Omar", vbNullString, , , vbTextCompare)
RS = Replace(RS, "IYAD", vbNullString, , , vbTextCompare)
'Removing any extra spaces (double spaces or more) that may be present after removing the sub strings
Do While InStr(RS, " ")
RS = Replace(RS, " ", " ")
Loop
'Removing any leading or trailing spaces that may be present after removing the sub strings
Text1.Text = Trim(RS)
ThAnks You aLL:)