ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Question on VBA : how to detect "idle" condition (https://www.excelbanter.com/excel-programming/400538-question-vba-how-detect-idle-condition.html)

Daniel[_18_]

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






Chip Pearson

Question on VBA : how to detect "idle" condition
 
Daniel,

See the code at http://www.cpearson.com/Excel/TimedClose.htm.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"Daniel" wrote in message
...
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







Daniel[_18_]

Question on VBA : how to detect "idle" condition
 
Many Thanks, Chip.

just what I needed.

I am most grateful.
Best regards,

Daniel


"Chip Pearson" a écrit dans le message de news:
...
Daniel,

See the code at
http://www.cpearson.com/Excel/TimedClose.htm.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"Daniel" wrote in message
...
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










All times are GMT +1. The time now is 12:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com