Link to home
Start Free TrialLog in
Avatar of codequest
codequest

asked on

Key stroke event to trigger action on ActiveForm Text Field

I've got a search string input field, an ActiveX text box,  at the top of a worksheet.   The search works fine.   Right now I trigger the search by a double click on the text box.  I'm looking for a way to trigger the search with a key stroke, like a tab key or something, so that when I finish typing the search parameters, I don't have to reach for the mouse.

I tried adding a second, blank field which I can use to click on, to trigger "Lost Focus" on the search field, but that's still a mouse move.

I tried using the change event on the search field, with a control value (@) to indicated "I'm done entering search parameters", but it seems to loop all over itself when I try to remove the @.

I basically gave up on the ActiveX and built a little modal form for this purpose, however, I'd still like to know if / how it could be done with ActiveX on the worksheet.

Any help with this would be appreciated.
ASKER CERTIFIED SOLUTION
Avatar of BobOxford
BobOxford

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of codequest
codequest

ASKER

Works slick.  Thanks!