Solved

How can I join 2 richTextBox rtf Text into 1

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

932 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now