Is there a way to recognize ANY keystroke in VBA?

RSW

Registered User.
Local time
Today, 09:45
Joined
May 9, 2006
Messages
178
On one of my spreadsheets I have a timer that times people out of a spreadsheet after a certain amount of time...I had some help here:

http://www.access-programmers.co.uk/forums/showthread.php?t=194313

But I would like to reset the timer any time a key is pressed. So the user will only be timed out if there's a period of inactivity.

I found the OnKey command, but that seems to specify one particular key.

Is there a better way I could do this, or do I just need a whole bunch of OnKey commands?

Would the command(s) work to reset the timer if placed right under the first setting of the AlertTime variable?

Thanks in advance!!
 
This is a shot in the dark but could you utilise the Worksheet_Selectionchange event which fires when you click into a different cell

Brian
 
This is a shot in the dark but could you utilise the Worksheet_Selectionchange event which fires when you click into a different cell

Brian

Great idea! Thanks!
 

Users who are viewing this thread

Back
Top Bottom