• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 158
  • Last Modified:

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
0
mmahdi
Asked:
mmahdi
1 Solution
 
watyCommented:
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

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now