Getting KeyPress Event to work

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm building a VBA program with Excel 2003 which will measure how quickly
respondents correctly answer random 4-choice questions. I've succeeded in
getting a millisecond timer Class object to work, as well as a UserForm that
posts the random questions. Now the hard part is establishinig continuity of
control over the key events, and actually using my timer to determine the
time interval from (1) to (2) below:

1) Start the millisecond timer the moment user clicks the command button
that brings up the UserForm with the question and 4 answer choices;
2) Stop the timer the moment when the user hits Alt 1, Alt 2, Alt 3 or Alt 4
to answer the question.

In other words, I made the time capable of timing the lag between clicking
one ok box and clicking another--as a test that it worked--now I have to get
it hooked up to the userform with the question's answers on the 4 checkboxes.

Does this call for a Keypress event that will direct control off of the Q&A
userform?


Thanks!
Pete M
 
Try the click event since one would think the user can use a keyboard or
mouse to make the selection.
 
Thanks--that worked!

Best,
Peter

Tom Ogilvy said:
Try the click event since one would think the user can use a keyboard or
mouse to make the selection.
 

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

Back
Top