View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pete Pete is offline
external usenet poster
 
Posts: 193
Default Getting KeyPress Event to work

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