Results 1 to 3 of 3

Thread: Help with this Code?

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2011
    Posts
    2

    Exclamation Help with this Code?


    I am trying to replace the text, FILENAME, which is in RichTextBox1 with whatever the person types in TextBox15. Any help?

  2. #2

    Thread Starter
    New Member
    Join Date
    Dec 2011
    Posts
    2

    Re: Help with this Code?

    vb Code:
    1. Public Class Form1
    2.  
    3.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    4.         If RichTextBox1.Contains("FILENAME") Then Replace("FILENAME", TextBox15.Text)
    5.         RichTextBox1.Text = RichTextBox1.Text.Replace("""", "\""")
    6.     End Sub

  3. #3
    Junior Member d.crozier7's Avatar
    Join Date
    Dec 2011
    Location
    United States
    Posts
    28

    Re: Help with this Code?

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width