Consulting

Results 1 to 4 of 4

Thread: Enter Key activates Command Button

  1. #1
    VBAX Tutor Philcjr's Avatar
    Joined
    Jul 2005
    Location
    Bedminster, NJ
    Posts
    208
    Location

    Enter Key activates Command Button

    All,

    I have a user form that when acivatied, I would like to allow the user to select/hit "enter" either from the numberpad or keyboard.

    By doing so, I would like the action to trigger the command button (cmd_enter) to be clicked.

    Thanks,
    Phil

  2. #2
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    You can force this, but the standard key to fire the click event of the control with focus is the spacebar
    K :-)

  3. #3
    VBAX Master Norie's Avatar
    Joined
    Jan 2005
    Location
    Stirling, Scotland
    Posts
    1,831
    Location
    Phil

    Set the Default property of the command button to True.

  4. #4
    VBAX Tutor Philcjr's Avatar
    Joined
    Jul 2005
    Location
    Bedminster, NJ
    Posts
    208
    Location
    Norie,

    Thanks - setting the "Default" property to "True" worked...

    Thanks again

Posting Permissions

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