Solved

How to programmatically insert a linefeed into a text box

Posted on 1998-10-15
3
149 Views
Last Modified: 2010-04-30
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
Comment
Question by:mmahdi
3 Comments
 
LVL 14

Accepted Solution

by:
waty earned 50 total points
ID: 1440093
Do as follow :

text1.Text = line1 & vbCrLf & line2
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1440094
Don't forget to set the text box .MultiLine property to True!

M

0
 
LVL 1

Author Comment

by:mmahdi
ID: 1440095
Cool! Tanks
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now