Click to See Complete Forum and Search --> : Help with this Code?
McHabbo
Dec 18th, 2011, 01:24 PM
I am trying to replace the text, FILENAME, which is in RichTextBox1 with whatever the person types in TextBox15. Any help?
McHabbo
Dec 18th, 2011, 01:29 PM
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
d.crozier7
Dec 25th, 2011, 11:26 PM
Maybe try replacing it with this...
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
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.