Results 1 to 4 of 4

Thread: Replace Text?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2010
    Posts
    106

    Question Replace Text?

    well i need to make it so it will replace RichTextBox1's selected text with: <ST>, where ST is the initially selected text, Thanks

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Replace Text?

    The RichTextBox has a SelectedText property. You can get the current value of that property, edit it as required, then assign the new value back to the property.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2010
    Posts
    106

    Re: Replace Text?

    o so RichTextBox1.SelectedText = "<" & RichTextBox1.SelectedText & ">" ?

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Replace Text?

    Quote Originally Posted by reconrey View Post
    o so RichTextBox1.SelectedText = "<" & RichTextBox1.SelectedText & ">" ?
    When you tried it, did that work?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Tags for this Thread

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