+ Reply to Thread
Results 1 to 3 of 3

First login & last Logout

  1. #1
    Vikky
    Guest

    First login & last Logout

    Hi Experts;


    I need to make a report of first login & Last logout time.

    Please help me.

    Sample Data:--
    ===========
    Agent Logged In Time Logged Out Time

    103134 - Verma, Naveen 8/16/2006 4:11:11 PM 8/16/2006 9:07:59 PM
    103134 - Verma, Naveen 8/16/2006 9:12:20 PM 8/17/2006 12:03:36 AM
    104226 - Sehgal, Rajiv 8/16/2006 4:49:48 PM 8/16/2006 5:01:16 PM
    104272 - Gupta, Ruchi 8/16/2006 4:13:37 PM 8/16/2006 5:13:11 PM
    104272 - Gupta, Ruchi 8/16/2006 5:15:24 PM 8/16/2006 9:00:59 PM
    104272 - Gupta, Ruchi 8/16/2006 9:13:11 PM 8/16/2006 9:13:30 PM
    104272 - Gupta, Ruchi 8/16/2006 9:17:20 PM 8/17/2006 12:03:31 AM
    104510 - P Samuel, Christina 8/16/2006 4:11:31 PM 8/16/2006 11:24:03
    PM
    104510 - P Samuel, Christina 8/16/2006 11:27:39 PM 8/17/2006 12:04:03
    AM
    104571 - Verma, Puneet 8/16/2006 4:08:45 PM 8/16/2006 4:17:06 PM
    104571 - Verma, Puneet 8/16/2006 4:17:33 PM 8/16/2006 5:35:12 PM
    104571 - Verma, Puneet 8/16/2006 5:36:02 PM 8/17/2006 12:04:04 AM
    104668 - Bhutani, Gaurav 8/16/2006 4:16:58 PM 8/16/2006 5:17:44 PM
    104668 - Bhutani, Gaurav 8/16/2006 5:19:01 PM 8/16/2006 6:01:50 PM


    Thanks.

    Regards;
    Vikky


  2. #2
    Bob Phillips
    Guest

    Re: First login & last Logout

    You should be able to do something with this

    Option Explicit

    Const LOG_FILENAME As String = "LogFile.txt"

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Dim iFile As Long

    iFile = FreeFile
    Open ThisWorkbook.Path & "\" & LOG_FILENAME For Append As #iFile
    Print #iFile, ThisWorkbook.Name & " logged in at " & _
    Format(Now, "dd-mmm-yyyy hh:mm:ss")
    Close #iFile
    End Sub

    Private Sub Workbook_Open()
    Dim iFile As Long

    iFile = FreeFile
    Open ThisWorkbook.Path & "\" & LOG_FILENAME For Append As #iFile
    Print #iFile, ThisWorkbook.Name & " logged out at " & _
    Format(Now, "dd-mmm-yyyy hh:mm:ss")
    Close #iFile

    End Sub

    This is workbook event code.
    To input this code, right click on the Excel icon on the worksheet
    (or next to the File menu if you maximise your workbooks),
    select View Code from the menu, and paste the code



    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "Vikky" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Experts;
    >
    >
    > I need to make a report of first login & Last logout time.
    >
    > Please help me.
    >
    > Sample Data:--
    > ===========
    > Agent Logged In Time Logged Out Time
    >
    > 103134 - Verma, Naveen 8/16/2006 4:11:11 PM 8/16/2006 9:07:59 PM
    > 103134 - Verma, Naveen 8/16/2006 9:12:20 PM 8/17/2006 12:03:36 AM
    > 104226 - Sehgal, Rajiv 8/16/2006 4:49:48 PM 8/16/2006 5:01:16 PM
    > 104272 - Gupta, Ruchi 8/16/2006 4:13:37 PM 8/16/2006 5:13:11 PM
    > 104272 - Gupta, Ruchi 8/16/2006 5:15:24 PM 8/16/2006 9:00:59 PM
    > 104272 - Gupta, Ruchi 8/16/2006 9:13:11 PM 8/16/2006 9:13:30 PM
    > 104272 - Gupta, Ruchi 8/16/2006 9:17:20 PM 8/17/2006 12:03:31 AM
    > 104510 - P Samuel, Christina 8/16/2006 4:11:31 PM 8/16/2006 11:24:03
    > PM
    > 104510 - P Samuel, Christina 8/16/2006 11:27:39 PM 8/17/2006 12:04:03
    > AM
    > 104571 - Verma, Puneet 8/16/2006 4:08:45 PM 8/16/2006 4:17:06 PM
    > 104571 - Verma, Puneet 8/16/2006 4:17:33 PM 8/16/2006 5:35:12 PM
    > 104571 - Verma, Puneet 8/16/2006 5:36:02 PM 8/17/2006 12:04:04 AM
    > 104668 - Bhutani, Gaurav 8/16/2006 4:16:58 PM 8/16/2006 5:17:44 PM
    > 104668 - Bhutani, Gaurav 8/16/2006 5:19:01 PM 8/16/2006 6:01:50 PM
    >
    >
    > Thanks.
    >
    > Regards;
    > Vikky
    >




  3. #3
    Vikky
    Guest

    Re: First login & last Logout

    Thank you Bob for your help. I'll do the same if find any problem ,i'll
    get back to you.

    Regards;

    Vikky


    Bob Phillips wrote:
    > You should be able to do something with this
    >
    > Option Explicit
    >
    > Const LOG_FILENAME As String = "LogFile.txt"
    >
    > Private Sub Workbook_BeforeClose(Cancel As Boolean)
    > Dim iFile As Long
    >
    > iFile = FreeFile
    > Open ThisWorkbook.Path & "\" & LOG_FILENAME For Append As #iFile
    > Print #iFile, ThisWorkbook.Name & " logged in at " & _
    > Format(Now, "dd-mmm-yyyy hh:mm:ss")
    > Close #iFile
    > End Sub
    >
    > Private Sub Workbook_Open()
    > Dim iFile As Long
    >
    > iFile = FreeFile
    > Open ThisWorkbook.Path & "\" & LOG_FILENAME For Append As #iFile
    > Print #iFile, ThisWorkbook.Name & " logged out at " & _
    > Format(Now, "dd-mmm-yyyy hh:mm:ss")
    > Close #iFile
    >
    > End Sub
    >
    > This is workbook event code.
    > To input this code, right click on the Excel icon on the worksheet
    > (or next to the File menu if you maximise your workbooks),
    > select View Code from the menu, and paste the code
    >
    >
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (replace somewhere in email address with gmail if mailing direct)
    >
    > "Vikky" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi Experts;
    > >
    > >
    > > I need to make a report of first login & Last logout time.
    > >
    > > Please help me.
    > >
    > > Sample Data:--
    > > ===========
    > > Agent Logged In Time Logged Out Time
    > >
    > > 103134 - Verma, Naveen 8/16/2006 4:11:11 PM 8/16/2006 9:07:59 PM
    > > 103134 - Verma, Naveen 8/16/2006 9:12:20 PM 8/17/2006 12:03:36 AM
    > > 104226 - Sehgal, Rajiv 8/16/2006 4:49:48 PM 8/16/2006 5:01:16 PM
    > > 104272 - Gupta, Ruchi 8/16/2006 4:13:37 PM 8/16/2006 5:13:11 PM
    > > 104272 - Gupta, Ruchi 8/16/2006 5:15:24 PM 8/16/2006 9:00:59 PM
    > > 104272 - Gupta, Ruchi 8/16/2006 9:13:11 PM 8/16/2006 9:13:30 PM
    > > 104272 - Gupta, Ruchi 8/16/2006 9:17:20 PM 8/17/2006 12:03:31 AM
    > > 104510 - P Samuel, Christina 8/16/2006 4:11:31 PM 8/16/2006 11:24:03
    > > PM
    > > 104510 - P Samuel, Christina 8/16/2006 11:27:39 PM 8/17/2006 12:04:03
    > > AM
    > > 104571 - Verma, Puneet 8/16/2006 4:08:45 PM 8/16/2006 4:17:06 PM
    > > 104571 - Verma, Puneet 8/16/2006 4:17:33 PM 8/16/2006 5:35:12 PM
    > > 104571 - Verma, Puneet 8/16/2006 5:36:02 PM 8/17/2006 12:04:04 AM
    > > 104668 - Bhutani, Gaurav 8/16/2006 4:16:58 PM 8/16/2006 5:17:44 PM
    > > 104668 - Bhutani, Gaurav 8/16/2006 5:19:01 PM 8/16/2006 6:01:50 PM
    > >
    > >
    > > Thanks.
    > >
    > > Regards;
    > > Vikky
    > >



+ 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