16 COMMENTS

  1. 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

  2. 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.

  3. 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.

  4. 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

LEAVE A REPLY

Please enter your comment!
Please enter your name here