Ask is to capture employee's login and logout time and send mail automatically. I am not a programmer. So if anyone could help with Macros it would be great help. I am using Excel 2010 version. Just a 3 member team sending mail to supervisor their login and logout time is what all i need. Thanks in advance.
Capture and send mail login and logout Time
- carmian
- Thread is marked as Resolved.
-
-
-
Re: Capture and send mail login and logout Time
What do you mean by 'Login' and 'Logout' times?
You don't 'log in' to Excel so maybe you mean the Windows login time? But that takes it out of the realm of Excel programming as Excel is not running then
You need to explain clearly.
-
Re: Capture and send mail login and logout Time
May be
Code
Display MorePrivate Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim OutApp As Object Dim OutMail As Object Dim strbody As String Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) strbody = Environ("USERNAME") & " " & "Login At " & Now() On Error Resume Next With OutMail .To = "abc.com" .CC = "" .BCC = "" .Subject = ThisWorkbook.FullName .Body = strbody .Send End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = Nothing End Sub
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!