Results 1 to 3 of 3

Thread: CR/LF in a text box?

  1. #1
    SusanP
    Guest

    Question

    I need to create a report that prints in a text box. I have the txtbox set to multiline, with scrollbars, and need to show and line up two columns of text, but can't seem to get the carriage return/line feed to work in the textbox.

    I thought I could simply insert chr(10) to start a new line within that textbox, but it simply puts in a weird character...Am I using the wrong ascii char? Is this poss in a text box?

    HELP!! Need this by 04/09 for a project!!!! AAAARGH!

  2. #2
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Without seeing all of your code, try inserting vbCrlf instead of Chr$(10).

  3. #3
    Hyperactive Member SoftwareMaker's Avatar
    Join Date
    Mar 2001
    Location
    Elbonia with Dilbert and Wally
    Posts
    322

    Hi Susan

    Use the VB intrinsic Constant >>> vbCrLf

    Text1.Text = "This is Line 1" & vbCrLf & "This is Line 2"
    William T
    Software Architect / Chief Software Developer
    Softwaremaker.Net Pte Ltd
    http://www.Softwaremaker.net

    *** Things are always the darkest before they go pitch black ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width