Results 1 to 8 of 8

Thread: Textboxes

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Canada
    Posts
    13

    Post

    This will sound pathetic to most of you, but since I'm just learning VB (4) I don't know much about the "extras" within VB.

    My question is how to skip lines when entering text into a textbox using txtText1.text = "text here"... so, how do I put in text, then jump down a couple of lines.

    Thanks.

  2. #2
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444

    Post

    first I have VB6 so I don't know what the VB4 limits may be.
    Set the text box multiline property to true.
    Private Sub Form_Load()
    textbox1.text= "Hello" & vbcrlf & "World"
    End Sub

    will put:
    Hello
    World
    in the text box.

    ------------------
    I am so skeptacle, I can hardly believe it!

  3. #3
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827

    Post

    I think maybe there's a hard carraige return character. If you put that in, it should simulate pressing <ENTER>, or at least that's what I think.

    Not sure how you get it now though. Maybe the Asc() function? Darned if I can remember. I think it has a ASCII code, so you should be able to use the function that converts an ASCII code into a character. Maybe Char() or something. If you look in the help index for Asc(), if that's not the right function, I'm pretty sure the 'see also' link will take you to the right one.

    Then again, I could be completely wrong, and there isn't a hard carraige return character

    Please tell me if I'm mistaken. I hope I'm not.

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Canada
    Posts
    13

    Post

    It works beautifully, thanks very much Badgers.

  5. #5
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827

    Post

    Erm... oh yeah. That too

  6. #6

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Canada
    Posts
    13

    Post

    Thanks for your reply Harry, just I got badgers' first and it is simpler and does exactly what I need it to do.

  7. #7
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827

    Post

    You're more than welcome, really. I think his idea is a little easier, don't you? Hehe

  8. #8
    Guest

    Post

    Another way would be to send the ascii code for a carriage return..

    Chr(10)

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