Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting KeyPress Event to work
Try the click event since one would think the user can use a keyboard or
mouse to make the selection. -- Regards, Tom Ogilvy "Pete" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting KeyPress Event to work
Thanks--that worked!
Best, Peter "Tom Ogilvy" wrote: Try the click event since one would think the user can use a keyboard or mouse to make the selection. -- Regards, Tom Ogilvy "Pete" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I make cell keypress event? | Excel Programming | |||
How can I make cell keypress event? | Excel Programming | |||
Keypress Event | Excel Programming | |||
Trap CTRL+C keypress event | Excel Programming | |||
KeyPress Event | Excel Programming |