Click to See Complete Forum and Search --> : multiline textbox


Lonely Wolf
November 22nd, 1999, 05:00 AM
I've a form with textbox (multiline = true, scrollbars = vertical).
I'm using this to show messages:


var1= 123
form.show
form.text1.text= "abababab: " & var1 & chr(13) & " ananananan"



Why the result is not a textbox with 2 lines?
(i have "abababab: 123 'strange char' ananananan")

Chris Eastwood
November 22nd, 1999, 05:10 AM
Try using the built in constant vbCrLf for inserting a carriage-return/line-feed character pair.


eg.


var1= 123
form.show
form.text1.text= "abababab: " & var1 & vbCrLf & " ananananan"






Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb

Hastur
November 22nd, 1999, 05:15 AM
Hi,
Use the constant VbCrLf instead of Chr(13). Or, if you really want to use the chr function, do Chr(13) & Chr(10) instead of Chr(13) alone.
Don't forget of course to set the Multiline property of your textbox to True ;o)