I've worked through quite a bit of this. Spent MANY hours trying to work it out.
There's LOTS of things to consider. #1.. is this for personal use, or for many people in an office? 1a) If it is an office, is there an I.T. department that controls PC and Windows configuration? Windows has a "Group Policy" that allows you to create login/logouts scripts for Windows. Since my work environment has an I.T. Department that controlls our system configurations, I could not utilize this method. (They locked out the Group Policy Editor) Instead, I created a login and logout VB script that writes to a text file. It looks for today's date. If found, it compares the current time to the time record. If for some reason, the current time is EARLIER than the login time recorded, it overwrites it. (this should only happen if someone manually modified the file) This vbscript is placed in the Startup folder and runs when windows Starts. logOUT is a bit of a problem. I created a vbscript to use to log out. It records the time, then exits windows. However, the user MUST use this script to log out. If windows is exited normally, (or abnormally for that matter)... basically.. if any other method is used to log out, the time is not recorded. For Personal use, I am very disciplined about using this. But for widespread use? I wouldn't trust it. Another security issue is that the file it updates is a simple text file. Therefore, a user COULD modify the values... (i.e.: I was 10 minutes late getting to my desk because my boss was talking to me at the coffee machine on the way in. So, I wanted to "back out" the time so it wouldn't show up as "late"...) I've CONSIDERED trying to open the file as "Binary". I've done this from Excel before, but not from VBScript. My excel file then updates from this log file when opened. Paul ----------------------------------------- “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley ----------------------------------------- ________________________________ From: David Grugeon <da...@grugeon.com.au> To: excel-macros@googlegroups.com Sent: Mon, August 13, 2012 9:25:56 AM Subject: Re: $$Excel-Macros$$ Need your help Magnesh and Paul I think you could put an excel file (or a shortcut to one), in the startup folder. have an on open macro in the sheet to record the opening time. Then have a before close macro to record the time and save itself. My only concern would be whether Windows kills excel before the saving process is complete. Otherwise it should work, provided you don't mind having the file, and excel, open all day. On 13 August 2012 22:55, Paul Schreiner <schreiner_p...@att.net> wrote: This is going to be a tough one. >It involves access to the Windows environment. >I REALLY hope someone has an alternative, >but I think you're going to have to write some >VBscript files that run at Windows Login and Logout >that will make entries to a log file. > >Paul >----------------------------------------- >“Do all the good you can, >By all the means you can, >In all the ways you can, >In all the places you can, >At all the times you can, >To all the people you can, >As long as ever you can.” - John Wesley >----------------------------------------- > > > > > ________________________________ From: Mangesh Vimay <mangesh.da...@gmail.com> >To: excel-macros@googlegroups.com; NOORAIN ANSARI <noorain.ans...@gmail.com>; >rajan verma <rajanverma1...@gmail.com> >Sent: Mon, August 13, 2012 8:48:16 AM >Subject: $$Excel-Macros$$ Need your help > > >Hi Friends, > > >Please help me on issue below. >Issue :- I need such excel file which can automatically stored login time >with >date and logout time so that I could able to analysis for how much time my >computer was switched on/in use. >For example, >If I login by the time 7:00:00 AM and logout on 12:30:00 PM on Date 13/8/2012. >Then it should feed all these data in an excel sheet like as - > > > > >We can take help of VBA also. >I hope I am able to tell you my need. If not please let me know. >Thanks in advance. > >-- >With regards, > > >MaNgEsH >-- >Join official facebook page of this forum @ >https://www.facebook.com/discussexcel > >FORUM RULES (1120+ members already BANNED for violation) > >1) Use concise, accurate thread titles. Poor thread titles, like Please Help, >Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get >quick attention or may not be answered. > >2) Don't post a question in the thread of another member. > >3) Don't post questions regarding breaking or bypassing any security measure. > >4) Acknowledge the responses you receive, good or bad. > >5) Cross-promotion of, or links to, forums competitive to this forum in >signatures are prohibited. > > >6) Jobs posting is not allowed. > >7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed. > >NOTE : Don't ever post personal or confidential data in a workbook. Forum >owners >and members are not responsible for any loss. >--- >You received this message because you are subscribed to the Google Groups "MS >EXCEL AND VBA MACROS" group. >To post to this group, send email to excel-macros@googlegroups.com. >To unsubscribe from this group, send email to >excel-macros+unsubscr...@googlegroups.com. > > >-- >Join official facebook page of this forum @ >https://www.facebook.com/discussexcel > >FORUM RULES (1120+ members already BANNED for violation) > >1) Use concise, accurate thread titles. Poor thread titles, like Please Help, >Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get >quick attention or may not be answered. > >2) Don't post a question in the thread of another member. > >3) Don't post questions regarding breaking or bypassing any security measure. > >4) Acknowledge the responses you receive, good or bad. > >5) Cross-promotion of, or links to, forums competitive to this forum in >signatures are prohibited. > > >6) Jobs posting is not allowed. > >7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed. > >NOTE : Don't ever post personal or confidential data in a workbook. Forum >owners >and members are not responsible for any loss. >--- >You received this message because you are subscribed to the Google Groups "MS >EXCEL AND VBA MACROS" group. >To post to this group, send email to excel-macros@googlegroups.com. >To unsubscribe from this group, send email to >excel-macros+unsubscr...@googlegroups.com. > > > -- RegardsDavid Grugeon -- Join official facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES (1120+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. 6) Jobs posting is not allowed. 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To post to this group, send email to excel-macros@googlegroups.com. To unsubscribe from this group, send email to excel-macros+unsubscr...@googlegroups.com. -- Join official facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES (1120+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. 6) Jobs posting is not allowed. 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To post to this group, send email to excel-macros@googlegroups.com. To unsubscribe from this group, send email to excel-macros+unsubscr...@googlegroups.com.
<<image.png>>