Solved

How can I join 2 richTextBox rtf Text into 1

Posted on 2006-06-10
1
269 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 85

Accepted Solution

by:
Mike Tomlinson earned 500 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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.
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…
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…

735 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