Results 1 to 7 of 7

Thread: how to insert a newline character in textbox?

  1. #1

    Thread Starter
    Member bamboosam's Avatar
    Join Date
    Feb 2001
    Posts
    61
    i want to print few strings in the textbox ,but i don't know how to use newline character to seperate them.
    _______________________
    VB 6 professional
    java2 SDK 1.3

  2. #2
    Fanatic Member faisalkm's Avatar
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    752
    use vbcrlf
    Faisal Muhammed
    Homepage:I Started making it in 1994 ...Still Under Construction
    Using

    Visual Basic 6.0 Enterprise SP5
    Embedded Visual Basic 3.0
    SQL Server 2000
    Windows 2000 Proff
    Delphi 6.0


    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

  3. #3

    Thread Starter
    Member bamboosam's Avatar
    Join Date
    Feb 2001
    Posts
    61
    i try to use it , but still can not compile.

    i do like this :

    text1.text = "hello" vbcrlf "hi" vbcrlf "yes"


    not working .
    _______________________
    VB 6 professional
    java2 SDK 1.3

  4. #4
    Lively Member
    Join Date
    Feb 2001
    Location
    Qc, Canada
    Posts
    70
    forgot "&" between words and vbcrlf
    Steph
    Virtually Impossible !

    VB5 Entreprise (SP3) - VB6 Entreprise (SP4), MSSQL7, MSAccess, VBA, VBScript, ASP

  5. #5
    Fanatic Member faisalkm's Avatar
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    752
    Sorry my mistake ..I need to be more specific
    text1.text = "hello" & vbcrlf & "hi" & vbcrlf & "yes"
    Faisal Muhammed
    Homepage:I Started making it in 1994 ...Still Under Construction
    Using

    Visual Basic 6.0 Enterprise SP5
    Embedded Visual Basic 3.0
    SQL Server 2000
    Windows 2000 Proff
    Delphi 6.0


    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

  6. #6
    Frenzied Member
    Join Date
    Sep 1999
    Location
    Phoenix, az
    Posts
    1,517

    Lightbulb VbNewLine

    You can also use VbNewLine with
    a textbox control

  7. #7
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    I'm pretty sure the Text1.MultiLine Property has to be set to true.

    Then you can use:
    Text1.Text = "Hello" & vbNewLine & "Then a new line"

    get it?

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