Solved

How can I join 2 richTextBox rtf Text into 1

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…

707 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

17 Experts available now in Live!

Get 1:1 Help Now