Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Adding text to a multilined Textbox

Posted on 2003-03-20
7
Medium Priority
?
178 Views
Last Modified: 2010-05-01
What is the best and easiest way to insert new lines of text into a multilined textbox.  I just need to append text everytime a button is clicked.

Thanks
Greg
0
Comment
Question by:prymak
7 Comments
 
LVL 18

Accepted Solution

by:
bobbit31 earned 220 total points
ID: 8175036
text1.text = text1.text & vbCrLf & <text to add>
0
 
LVL 1

Expert Comment

by:LordSkitch
ID: 8175575
I've had that not work for me on occasion, you may try

NewLine = Chr(13) + Chr(10)

then do text1.text = "spoot" & vbNewLine & "spoot2"
0
 
LVL 14

Expert Comment

by:CyrexCore2k
ID: 8175877
I'm almost with bobbit31 except that his code is going to make a blank line the first time you use it.

text1.text = text1.text & "My nth line..." & vbCrLf

That might be better for you.

Hope this helps,
Spencer Ruport
0
Independent Software Vendors: 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!

 
LVL 1

Expert Comment

by:LordSkitch
ID: 8176029
i've just become weary of using vbcrlf, it doesnt seem to work in all situations... im sure it'll work for a textbox though
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 8176063
vbCrLf = Chr(13) & Chr(10)
0
 
LVL 1

Expert Comment

by:LordSkitch
ID: 8176096
yeah i know, but for some strange reason, it doesnt always work... thats microsoft for ya eh? hehe
0
 

Author Comment

by:prymak
ID: 8176704
Thanks for the help
0

Featured Post

Industry Leaders: 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

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month11 days, 14 hours left to enroll

564 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