1. So you have a string. Whether it be a label caption, an entry in a text box by the user of your program, or an item in a combo box. Let's say this is a bad string, something you do not want to appear. For instance, a user types "X is gay" in a text box, and you want to change that to something else. You can simply have it be deleted, or replaced with another value.
2. To make this work when a user types something in a textbox, you will need to use this sub:
End Sub
Then we'll use the replace function. This looks like:
3. Now we want to find the text "X is gay" in the textbox. Remember our Text1_Change() Sub? We'll now insert the following code inside that sub.
Dim txt
txt = Text1.Text
If InStr(1, Text1.Text, "X is gay") > 0 Then
Text1.Text = Replace(txt, "X is gay", "User is gay")
End If
End Sub
4. Done! What this code does is look for the value "X is gay" in Text1.Text, and if that is greater than 0 (meaning true) it replaces text in Text1.Text with "User is gay"
That's all there is to it. If you have any questions, feel free to e-mail me at ViRuaL@gmail.com. If you thought this was completely useless, feel free to flame it into oblivion.

