Results 1 to 3 of 3

Thread: Multiline Textbox

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Posts
    3

    Multiline Textbox

    Okay.. probably another idiot question.. but.. how do I get back to line1 of a multi line Textbox after sending data from it..?

    This is how my code works so far:

    Private Sub Text1_KeyPress(KeyAscii As Integer)

    If (KeyAscii = 13) Then
    strVariabe = Text1.Text
    Text1.Text = ""
    End If

    End Sub

    However.. after pressing Return and sending the data to strVariable, and clearing the text box.. it always returns to line2 of the box.. while I want the entry point back at the start of the text box.
    I hope this makes sense.. it's driving me crazy!!!

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    so you don't want the new line entered, correct?
    VB Code:
    1. Private Sub Text1_KeyPress(KeyAscii As Integer)
    2.  
    3. If (KeyAscii = 13) Then
    4. strVariabe = Text1.Text
    5. Text1.Text = ""
    6. KeyAscii = 0
    7. End If
    8.  
    9. End Sub

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Posts
    3
    Woohoo!!!

    hahaha.. thank you, thank you, thank you!!

    You have no idea how much frustration you've saved me from!

    ::[Millhouse]::

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