?
Solved

Adding text to a multilined Textbox

Posted on 2003-03-20
7
Medium Priority
?
176 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
[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
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
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!

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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 Month8 days, 14 hours left to enroll

765 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