Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Multi-Line in Visual Basic Textbox

Posted on 1999-07-26
Medium Priority
Last Modified: 2013-11-25
I am using a textbox control and want to put multi-line data in it.  For example:

txtbox.text = This is line1 + char(13) + This is line2

I can't get it to work!  chr(13) is suppose to be the enter key, so what is displayed is:

This is line1 | This is line2

Where | is some sort of bold symbol.  I want this to be on two lines!!!  Please help.
Question by:qurashi
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
  • 2
LVL 18

Accepted Solution

deighton earned 200 total points
ID: 1527480
use vbcrlf instead of chr(13)
LVL 18

Expert Comment

ID: 1527481
txtbox.text = "This is line1" & vbcrlf & "This is line2"

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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

670 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