Results 1 to 2 of 2

Thread: Call enter key press in text box??

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 1999
    Posts
    25

    Post

    OK, anyone know how i can code so i can do the following:

    I have a text box that the user enters info in. Instead of making a command button for the user to activate the event procedure, i want the user to press enter, and that event procedure will be activated. How do i do this?? Thanks in advance.

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Put this on Key_Press event of the Textbox:

    Code:
    Private Sub Text1_KeyPress(KeyAscii As Integer)
        If KeyAscii = vbKeyReturn Then
            'Call your procedure here...
        End If
    End Sub

    Regards,

    ------------------

    Serge

    Software Developer
    [email protected]
    [email protected]


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