Link to home
Start Free TrialLog in
Avatar of prymak
prymak

asked on

Adding text to a multilined Textbox

What is the best and easiest way to insert new lines of text into a multilined textbox.  I just need to append text everytime a button is clicked.

Thanks
Greg
ASKER CERTIFIED SOLUTION
Avatar of bobbit31
bobbit31
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I've had that not work for me on occasion, you may try

NewLine = Chr(13) + Chr(10)

then do text1.text = "spoot" & vbNewLine & "spoot2"
Avatar of CyrexCore2k
I'm almost with bobbit31 except that his code is going to make a blank line the first time you use it.

text1.text = text1.text & "My nth line..." & vbCrLf

That might be better for you.

Hope this helps,
Spencer Ruport
i've just become weary of using vbcrlf, it doesnt seem to work in all situations... im sure it'll work for a textbox though
vbCrLf = Chr(13) & Chr(10)
yeah i know, but for some strange reason, it doesnt always work... thats microsoft for ya eh? hehe
Avatar of prymak
prymak

ASKER

Thanks for the help