VB Easy Question

Discussion in 'OT Technology' started by Fase, Mar 23, 2005.

  1. Fase

    Fase Your Face, In A Pickle Jar.

    Joined:
    Apr 6, 2004
    Messages:
    29,540
    Likes Received:
    0
    Location:
    Windsor, Ont, Canada.
    For say a Textbox, how to I put in an enter, as in skip line.
    Such as
    Textbox1.text = "dog" + "cat"
    It would put them as "dogcat" how would I get it to put it as
    "Dog
    Cat"
     
  2. Slid.

    Slid. I'm a guy.

    Joined:
    Oct 25, 2001
    Messages:
    1,928
    Likes Received:
    0
    Location:
    NH
    Well, for one you need to set the textbox as a multiline box -- this should be in properties. For creating a line break you need: Chr(10) + Chr(13). You might even get away with Chr(13) -- it's been a while :).

    So:

    Textbox1.Text = "dog" + Chr(10) + Chr(13) + "cat"
     
  3. Keyzs

    Keyzs OT Supporter

    Joined:
    Nov 3, 2003
    Messages:
    814
    Likes Received:
    0
    Location:
    Charlotte, MI
    Or

    Textbox1.Text = "dog" & vbCrLf & "cat"
     
  4. Fase

    Fase Your Face, In A Pickle Jar.

    Joined:
    Apr 6, 2004
    Messages:
    29,540
    Likes Received:
    0
    Location:
    Windsor, Ont, Canada.
    Sweet thanks alot guys
     

Share This Page