Question on VBA : how to detect "idle" condition
Hi everybody,
I have this Excel worksheet, associated with a "Auto Open" macro. After this
macro has performed the few tasks it is designed for, the user is then free
to enter whatever he wants to in the spreadsheet.
I would like to automatically save the worksheet and exit Excel if there is
no activity (i.e. if the user doesn't move the mouse, press a key,
anything...) at a given time, after the macro has done it's job.
Is there a simple way to do this ? For instance, would the solution consist
in detecting that there is not change whatsoever on the Excel screen and
Exit after a counter has elapsed , whilst letting the user react at any time
?
(sorry about my lousy English, guys).
Could someone suggest a few lines of code I could try ?
Many thanks in advance for your time and kind help.
BRGDS,
Daniel
|