+ Reply to Thread
Results 1 to 7 of 7

Macro to track system's idle time

Hybrid View

  1. #1
    Registered User
    Join Date
    08-06-2012
    Location
    pune
    MS-Off Ver
    Excel 2010
    Posts
    3

    Macro to track system's idle time

    Hello everyone,

    Background - I am handling a big team and would like to understand how much time team members are spending on the floor most importantly what are there break timings for this I have prepared a daily activity tracker which populates time in a cell of column "C" automatically as soon as user updates anything in a cell of column "B" and have instructed all team members to update that.

    Problem - I am facing problem due to few notorious guys because above mentioned arrangement works only if guys are updating there worksheet honestly but in this scenario few guys are intentionally not updating their tracker properly which is resulting improper treatment with other team members, which off course i don't want.

    Solution - I am looking to develop a macro which tracks system idle time. Would like to capture time if system remains idle for 5 minutes and again would like to capture time when user starts working. I also tried goggling lot about my problem but didn't find any solution, though i found some idea that how mouse movement can be tracked to see if system is idle or not through some API. Considering i am not that conversant in VBA to be able to understand and create the code on my own.

    Requesting you guys to please help me in putting together a VBA code which can do what i am expecting in "solution" section.


    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Macro to track system's idle time

    Hello there,

    Okay I think this will work for you although you may need to play with it to get the time values you would like. Attached is a workbook I created with the help of the below website:

    http://www.excelforum.com/excel-prog...nactivity.html

    Basically when the workbook is open it begins running a code that counts, in increments of 5 seconds, how long it is before the user has activity in the workbook, whether it be a selection change or edit to a cell. Then when the user becomes active in the workbook, in any sheet after the first worksheet, the code populates the first worksheet in the workbook in column A of the first empty row with the amount of time that has passed.

    To see this worksheet work, open the workbook and enable macros. Then select the second tab/worksheet in the workbook. Type text into any cell and then wait about 15 seconds to select anywhere on the worksheet or enter another value. After 15 seconds, select the first worksheet in the workbook and you should see the amount of time that has passed between you last were active in the workbook.

    Let me know if you have any questions or if this works for you.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-06-2012
    Location
    pune
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro to track system's idle time

    Thanks a lot dear for your valuable response. your suggestion is pretty close to what i am looking for. If you can suggest how can i track system's idle time in spite-of this workbook's idle time would be really helpful to me.

    Once again thanks for your quick and valuable response.
    Last edited by Cutter; 08-08-2012 at 07:22 PM. Reason: Removed whole post quote

  4. #4
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Macro to track system's idle time

    I'm sorry, I don't quite understand what you are trying to accomplish. Could you please elaborate?

    Thanks!

  5. #5
    Registered User
    Join Date
    08-06-2012
    Location
    pune
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro to track system's idle time

    Thanks once again for your quick response.

    Basically i am trying to track system idle time using VBA in excel, i am attaching a file here containing description and format. Please do suggest if it needs further explanation.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-04-2012
    Location
    pune
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Macro to track system's idle time

    Hi Team,
    I want to make break tracker. When i press Windows + L Or CTRL + ALT + DELETE (Lock computor) Autometically lock time upload in my excel sheet. Then when i unlock pc then automaticaly unlock time will upload in my excel sheet.

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro to track system's idle time

    Milu,

    Welcome to the forum.

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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