I am trying to replace the text, FILENAME, which is in RichTextBox1 with whatever the person types in TextBox15. Any help?
Printable View
I am trying to replace the text, FILENAME, which is in RichTextBox1 with whatever the person types in TextBox15. Any help?
vb Code:
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If RichTextBox1.Contains("FILENAME") Then Replace("FILENAME", TextBox15.Text) RichTextBox1.Text = RichTextBox1.Text.Replace("""", "\""") End Sub
Maybe try replacing it with this...
Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If RichTextBox1.Contains("FILENAME") Then
RichTextBox1.Text = (TextBox15.Text)
RichTextBox1.Text = RichTextBox1.Text.Replace("""", "\""")
End If
End Sub