Question on VBA : how to detect "idle" condition

  • Thread starter Thread starter Daniel
  • Start date Start date
D

Daniel

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top