Trevor Cayford
Trevor Cayford

Reputation: 1

How to place text from a textbox into a richtextbox vb and add extra text to the RichTextBox

I want to know how to take the text a user places from a textbox into a RichTextBox. For example:

TextBox = Waffles

RichTextBox = These (Text from TextBox) are good

Upvotes: 0

Views: 72

Answers (1)

hammus
hammus

Reputation: 2612

TextBox.Text = "Waffles"
RichTextBox.Text = TextBox.Text & "Text to Add"

EDIT: Updated with further question from OP in comments.

How can I add quotation marks to the text?

To print quotation mark in a string you need to enclose them in string delimiter quotes:

dim str as String
dim quotedStr as String
str = "My Text"
quotedStr = """ & str & """

Or in your case RichTextBox.Text = """ & TextBox.Text & """

Upvotes: 1

Related Questions