Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    simulate key ENTER and start sub (6.0)

    I have a form activate. Now how to start a sub if i press a ENTER key from keybord?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: simulate key ENTER and start sub (6.0)

    You could place a command button on the form that starts the procedure (Sub) and set the Default property of the command button to True. Pressing Enter will act like clicking the command button.

    Or you can set the KeyPreview property of the form to True and use the KeyDown event to intercept the Enter key. But that might have undesired side effects, so I'd use the first suggestion.

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: simulate key ENTER and start sub (6.0)

    Work... tks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •