• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1194
  • Last Modified:

Multi-Line in Visual Basic Textbox

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.
  • 2
1 Solution
use vbcrlf instead of chr(13)
txtbox.text = "This is line1" & vbcrlf & "This is line2"
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now