How to programmatically insert a linefeed into a text box

This is a simple one (not for me though):

I would like to insert several lines of text into a text box at runtime but each one in a seperate line. When I use for exple: text1 = line1 & vbcr & line2, the text1 box shows: 'line1'|'line2'

Please help.

Regards
Mmahdi
LVL 1
mmahdiAsked:
Who is Participating?
 
watyConnect With a Mentor Commented:
Do as follow :

text1.Text = line1 & vbCrLf & line2
0
 
mark2150Commented:
Don't forget to set the text box .MultiLine property to True!

M

0
 
mmahdiAuthor Commented:
Cool! Tanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.