Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Replacing Lines of a RichTextBox

Posted on 1998-08-07
1
Medium Priority
?
156 Views
Last Modified: 2010-04-30
Hi, does anyone know how to replace an entire line by specifying the line number and the string of a RichTextBox?
Thanx
0
Comment
Question by:captain_needa
1 Comment
 
LVL 1

Accepted Solution

by:
BlackAndWhite earned 100 total points
ID: 1468298
You maynot be able to do that by line numbers.  The line number of a statement in the richtext box is not the same as the real line number.  RichText box does text wraps for you even though there are no carriagereturn line feeds.  However you can replace strings.

1. Instr the string to search on the text of Richtextbox.
2. Select the text with selstart, sellength
3. Insert the new text



0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question