Hard Return in large textbox

T

Todd Huttenstine

Hey guys I have a large textbox that has word wrap
enabled. How do I programmatically insert a hard return
in the textbox?


Thank you

Todd Huttenstine
 
P

Peter Beach

Hi Todd,

Try something like:

TextBox1.Text = "Hello world" & vbCrLf & "Nice to see you"

HTH

Peter Beach
 
T

Todd Huttenstine

The code I used is below:

Dim Hist
Workbooks("sh").Worksheets("a").TextBox2.Value = Hist & Chr
(10) & (Workbooks("sh").Worksheets("a").TextBox1.Value)

The result is below:

(paragraph sign)word1(paragraph sign)word2(paragraph sign)
word3

When I say paragraph signs I mean the symbols for a
paragraph.
 
T

Todd Huttenstine

Hey

Ive triesd that and I get paragraph sign sjust like I get
with the CHR(10).

Do I need to maybe set something up a little different?


Thanks
Todd
 
T

Todd Huttenstine

Hey I got it. I had to set the multiline property to true.

Then both did the trick. Thanks for your help.

Todd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top