Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 193
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I make cell keypress event? No Name Excel Programming 0 September 13th 04 12:28 PM
How can I make cell keypress event? Tom Ogilvy Excel Programming 0 September 13th 04 12:25 PM
Keypress Event R Avery Excel Programming 2 August 4th 04 03:51 PM
Trap CTRL+C keypress event Nick Excel Programming 4 January 30th 04 09:17 PM
KeyPress Event Conrado Capistrano Excel Programming 4 September 25th 03 05:27 AM


All times are GMT +1. The time now is 12:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"