+ Reply to Thread
Results 1 to 3 of 3

Trigger Macro If System Is Idle for Certain Time.

Hybrid View

VJOSHI Trigger Macro If System Is... 09-25-2014, 09:11 AM
LJMetzger Re: Trigger Macro If System... 09-25-2014, 11:29 AM
Leith Ross Re: Trigger Macro If System... 09-25-2014, 12:42 PM
  1. #1
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Trigger Macro If System Is Idle for Certain Time.

    Hello VJOSHI,

    The attached workbook uses System Hooks (API) to monitor the keyboard and mouse. If either are moved the timer resets. Once the timer has expired, the workbook will save changes and close.

    You can change the time in the Workbook_Open() event module. Here is the code.
    Private Sub Workbook_Open()
        Call HookMouse
        Call HookKeyboard
        Call StartTimer(2 * 60)
    End Sub
    The red 2 indicates 2 minutes.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel Idle Time Close
    By MarkSSDM in forum Excel General
    Replies: 3
    Last Post: 04-14-2015, 11:23 AM
  2. Capture System Idle Time
    By VJOSHI in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2014, 11:38 AM
  3. Macro to track system's idle time
    By clickrudra in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-02-2013, 01:50 AM
  4. Trigger Macro on cell change by real time data
    By boesingen in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-04-2013, 04:22 PM
  5. Idle time
    By frequent391 in forum Excel General
    Replies: 1
    Last Post: 07-24-2011, 03:57 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1