Results 1 to 4 of 4

Thread: [RESOLVED] replace text

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2009
    Posts
    462

    Resolved [RESOLVED] replace text

    say textbox1.text =

    1
    4
    1
    6

    how can i replace all the "1" with anything i want like say i want to make ever "1" in textbox1.text a 2 so i would need textbox1.text to look like this when i press button1

    2
    4
    2
    6

  2. #2
    Stack Overflow mod​erator
    Join Date
    May 2008
    Location
    British Columbia, Canada
    Posts
    2,824

    Re: replace text

    Use this:
    vb Code:
    1. Me.TextBox1.Text = Me.TextBox1.Text.Replace("1","2")

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2009
    Posts
    462

    Re: replace text

    thank you

  4. #4
    Stack Overflow mod​erator
    Join Date
    May 2008
    Location
    British Columbia, Canada
    Posts
    2,824

    Re: replace text

    If your question is answered, please mark the thread [RESOLVED].

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