Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

VB Text Format Question

Options
  • 14-06-2002 4:54pm
    #1
    Registered Users Posts: 15,258 ✭✭✭✭


    this is prob a basic question but it is wrecking my head and i cant find the answer in help... it friday evening, just wanna go home

    how do i go to a new line in a text box.....

    for example

    Text1.Text = "First Line" & [insert new line command here] & "Second Line"

    i would like the output to be

    First Line
    Second Line

    in java it is just \n

    oh ya, i'm using embedded visual basic


Comments

  • Registered Users Posts: 4,676 ✭✭✭Gavin


    try \r\n

    windowsy.

    Gav


  • Registered Users Posts: 15,258 ✭✭✭✭Rabies


    no..
    didnt work...

    but thanks for trying


  • Registered Users Posts: 11,987 ✭✭✭✭zAbbo


    Text1.Text ="First Line" &vbcr & "Second Line"

    Visual Basic Carriage Return Line Feed


  • Registered Users Posts: 15,258 ✭✭✭✭Rabies


    Originally posted by pcirl.com
    Text1.Text ="First Line" &vbcr & "Second Line"
    Visual Basic Carriage Return Line Feed

    thanks....
    cant believe i didnt think of that....

    vbCr is just carriage return.. didnt work
    but vbCrLf worked....

    cheers....


  • Registered Users Posts: 11,987 ✭✭✭✭zAbbo


    yeah i`m getting rusty since collge finished

    vbcrlf is vb code for the old type writer line feed thing(you know when the thing gets to the end and you have to whack it back the orther way)

    Hope that gets you home early!

    Regards


  • Advertisement
  • Registered Users Posts: 2,781 ✭✭✭amen


    should really use
    vbnewline
    peforms the platform specifice cr and lf


  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    Originally posted by amen
    should really use
    vbnewline
    peforms the platform specifice cr and lf

    VB is multi-platform now????

    jc


  • Registered Users Posts: 2,781 ✭✭✭amen


    nope and you know its not multi platform

    thats what its def in the MSDN

    silly me for copying it


Advertisement