Solved

Replacing Lines of a RichTextBox

Posted on 1998-08-07
1
142 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

810 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