Results 1 to 4 of 4

Thread: enetr button to work like tab button

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    334

    Talking enetr button to work like tab button

    anyone got code that will wrk through the tab index as the user clicks enter?!

  2. #2
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: enetr button to work like tab button

    The code is like that, I am not sure exactly what it looks like, but thats the gist of it
    VB Code:
    1. Private Sub cboDestination_KeyPress(KeyAscii As MSForms.ReturnInteger)
    2.     If KeyAscii = 13 Then
    3.         KeyAscii = 0
    4.         SendKeys "{tab}"
    5.     End If
    6. End Sub

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    334

    Re: enetr button to work like tab button

    Quote Originally Posted by kfcSmitty
    The code is like that, I am not sure exactly what it looks like, but thats the gist of it
    VB Code:
    1. Private Sub cboDestination_KeyPress(KeyAscii As MSForms.ReturnInteger)
    2.     If KeyAscii = 13 Then
    3.         KeyAscii = 0
    4.         SendKeys "{tab}"
    5.     End If
    6. End Sub

    Thanks!!!!!
    But, isnt there a quciker way of doin this cos this way i need to write a sub for control?!

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: enetr button to work like tab button

    Each keypress event needs to have that code.

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