?
Solved

How to programmatically insert a linefeed into a text box

Posted on 1998-10-15
3
Medium Priority
?
156 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 14

Accepted Solution

by:
waty earned 200 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
Suggested Courses
Course of the Month15 days, 11 hours left to enroll

743 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