Results 1 to 3 of 3

Thread: [RESOLVED] How to prevent Next Line in Multi Line TextBox

  1. #1

    Thread Starter
    Addicted Member o0yuna0o's Avatar
    Join Date
    Mar 2006
    Posts
    172

    Resolved [RESOLVED] How to prevent Next Line in Multi Line TextBox

    How can i prevent Next Line or CHR(13) in Multi Line Textbox when i press the Enter Key?

    Because my client wants the Enter Key act as Tab Key... when i press enter it goes to next object... the problem is when i press enter key in multi line textbox it also create a CHR(13) in Textbox

    I know this is not that important but i hope some of you have a good suggestion to help me satisfy my client.


  2. #2
    Addicted Member
    Join Date
    Apr 2006
    Posts
    155

    Re: How to prevent Next Line in Multi Line TextBox

    VB Code:
    1. Private Sub Text1_KeyPress(KeyAscii As Integer)
    2. If KeyAscii = vbKeyReturn Then
    3.     KeyAscii = 0
    4. End If
    5. End Sub

  3. #3

    Thread Starter
    Addicted Member o0yuna0o's Avatar
    Join Date
    Mar 2006
    Posts
    172

    Re: How to prevent Next Line in Multi Line TextBox

    Quote Originally Posted by XRsTX
    VB Code:
    1. Private Sub Text1_KeyPress(KeyAscii As Integer)
    2. If KeyAscii = vbKeyReturn Then
    3.     KeyAscii = 0
    4. End If
    5. End Sub
    Thanks

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