I'm writing a program that has two text boxes and a RichTextBox. The program will have users input data into multiple text boxes and when I press the "insert" button the text does get inserted into the RichTextBox, but when I click another insert button, the text from that textbox overwrites the RichTextBox's current text. How would I prevent this.
Thanks for your help.
RichTextBox HELP
Started by WiiFan2012, Mar 27 2010 10:43 AM
4 replies to this topic
#1
Posted 27 March 2010 - 10:43 AM
|
|
|
#2
Posted 28 March 2010 - 12:45 AM
I need to assess the problem, are we trying to get text from both textbox1 and textbox2 into the richtextbox1?
#3
Posted 28 March 2010 - 05:50 AM
What you need here is appending the text inside the 2 textboxes into the richtextbox each time the button is clicked. To append text use RTB.text &= "New text to append" OR RTB.AppendText("New text to append")
#4
Posted 28 March 2010 - 06:22 AM
@Deadlock: Thats exactly what I needed, it works excellent!
One more thing, I would like the text to be inserted below the current entry. I suppose I can do that with vbNewLine?
Thanks for all your help!
One more thing, I would like the text to be inserted below the current entry. I suppose I can do that with vbNewLine?
Thanks for all your help!
#5
Posted 28 March 2010 - 07:19 AM
yes Exactly, RTB.Text &= vbNewLine & "New TexT"


Sign In
Create Account

Back to top










