16 thoughts on “Capture user name, login and logout times and calculate hours worked

    Tim Dent

    (May 17, 2018 - 7:06 am)

    Back at this one again. Everything works flawlessly, except where it says: firstdate = TimeValue(Cells(i, 2)). Keep getting a run-time error '13' message. Any answer(s) as to why this is happening❓

    Sub calHoursWorked()
    Dim firstdate As Date, seconddate As Date, n As Long, lastrow As Long
    Dim ws As Worksheet
    Set ws = Worksheets("Sheet1")
    lastrow = ws.Cells(Rows.Count, 1).End(xlUp).Row
    For i = 2 To lastrow
    firstdate = TimeValue(Cells(i, 2))
    seconddate = TimeValue(Cells(i, 3))
    n = DateDiff("s", firstdate, seconddate)
    Cells(i, 4) = n
    Cells(i, 4) = Cells(i, 4) / 3600
    Cells(i, 4) = Round(Cells(i, 4), 2)
    Next i
    End Sub

    xris

    (May 17, 2018 - 7:06 am)

    Hi Dinesh I am getting a runtime error 13

    xris

    (May 17, 2018 - 7:06 am)

    Hi dinesh. im not able to connect to the file that has the password and username. need your help. tnxs

    Ramiz Yoosaf

    (May 17, 2018 - 7:06 am)

    Hi Dineesh,

    how can i get full coding of this video.

    Princess Zaitisia Qureshi

    (May 17, 2018 - 7:06 am)

    Hi dinesh .. This ligin and log can be done on a share file

    Richard Valdez

    (May 17, 2018 - 7:06 am)

    I have always have run time error '13':
    Type mismatch and as watch on your video you put c As Long but you never use it but instead you B
    could you please help me

    Tim Dent

    (May 17, 2018 - 7:06 am)

    Nice concept.

    Ebinum Enuenwosu

    (May 17, 2018 - 7:06 am)

    hi sir can you do this using c# and recording it on a database

    zeshan azeem

    (May 17, 2018 - 7:06 am)

    Thanks Sir , I want to learn this type of thing about Excel.

    Minh Madina

    (May 17, 2018 - 7:06 am)

    thank you so much sir…. to share your knowledge

    Macho Man

    (May 17, 2018 - 7:06 am)

    Hi,,, is it possible to translate whole worksheet data from Chinese to English ? Hope you have a VBA solution for that .

    Barry Fitzpatrick

    (May 17, 2018 - 7:06 am)

    Users should aware that it is very easy to bypass logging on by disabling macros or disable macros on startup. Also there needs to be some protection of the password file and the log file to prevent Users viewing/modifying these files. These can all be overcome using macros.

    santosh r nath

    (May 17, 2018 - 7:06 am)

    Hello Sir, Thank you for providing knowledge about excel vba. Can you please create a video regarding loops for data validation and looping with userform combobox. There are many possibilities which creates different output. To do it manually and record its difficult. Hope you will help creating a video on this topic.

    Jack Pun

    (May 17, 2018 - 7:06 am)

    Very useful. Thanks.

    sudeep kasamsetty

    (May 17, 2018 - 7:06 am)

    hello Dinesh ji
    I am very thankful to you
    I have learned so many things by watching your online videos, and I became unique resource in our team. all the credits goes to you.

    at present I have developed a code and protected the same way you said in this video, but I got a code in internet which unlocks any vba project with the help of another new workbook.

    now my question is how can we overcome this issue and is there any way to send email or save log of people who have opened or views our code.

    I hope you understand my question , please help me out with this

    Sudeep Kasamsetty
    kskdeep@gmail.com

    JD21O

    (May 17, 2018 - 7:06 am)

    Wow!… It's a amazing; code: GetValueFromClosedWorkbook.
    Inspire!… I also want to teach macros in Spanish
    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *