Hi, i am trying to understand what the following code does, as efernandes wrote some code for me but when running this i get the following error:

Run time error '1004'
Application defined or object defined error

when clicking on debug:

it points to the following code:

If Application.WorksheetFunction.CountIf(Sheets("StaffList").Range("tbStaff[L4]"), Me.txtID.Value) > 0 Then
can any1 help me understand why i get this error. Thanks in advance.