Close form when I press enter

M

Michelle

I have a user-form with a 2-column combo box, and the combo-box opens as
soon as the form is displayed using:

Private Sub UserForm_Activate()
ddCodes.SetFocus
SendKeys ("{F4}")
End Sub

When I select an entry (or type the first letter of an entry and press
Enter), it closes the list, and then I have to press Enter (again) to
trigger the After_Update event (which closes the form and puts the value
into the cells).

I want to only have to only have to select an entry (or type and press Enter
once) to trigger an event - I don't care which event it is - I want to make
it as easy as possible for the users to select items from the list.

However, I can't use the change event, because that is triggered each time a
single character is typed, and sometimes users have to type multiple
characters into the box. Is there a way around this?

Appreciate your help - thanks

Michelle
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top