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

x
?
Solved

How can I join 2 richTextBox rtf Text into 1

Posted on 2006-06-10
1
Medium Priority
?
276 Views
Last Modified: 2013-12-25
Dear all,

I do have 2 richTextBox in my form. I would like to make it, once I click on 1 button "Combine", it will auto merge the 2 richTextBox rtf contain into 1.

I was using
rtbMessage1.textrtf = rbtMessage1.text & vbNewLine &  rbtMessage2.text

But the problem is, if I am using this method, it will not "copy" the "font style" in those richTextBox.

Please advice.

Thanks.

Regards,
Ching-Yen Beh

0
Comment
Question by:cybeh
1 Comment
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 16881778
Private Sub Command1_Click()
    RichTextBox1.SelStart = Len(RichTextBox1.Text)
    RichTextBox1.SelLength = 0
    RichTextBox1.SelRTF = vbCrLf & RichTextBox2.TextRTF
End Sub
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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

885 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