Hi I would like for my code to check if the entry has been submitted already before through a userform. So basically when I click on submit i want for it to check all the rows of a table that is linked to the userform and check if there is a row with the same information that match on a few textboxes with the information that is been submitted now.

I have written this code as part of the submit button but nothing happens.

Dim rngDate As Range
Dim rngShift As Range
Dim rngProcess As Range
Dim rngWorkOrder As Range
Dim rngSublot As Range

Set rngDate = ThisWorkbook.Sheets("Database").Range("A:A").Find(TextDate)
Set rngShift = ThisWorkbook.Sheets("Database").Range("C:C").Find(CmbShift)
Set rngProcess = ThisWorkbook.Sheets("Database").Range("E:E").Find(CmbProcess)
Set rngWorkOrder = ThisWorkbook.Sheets("Database").Range("F:F").Find(TextWorkOrder)
Set rngSublot = ThisWorkbook.Sheets("Database").Range("G:G").Find(TextSublot)


If TextDate.Text = rngDate And CmbShift.Text = rngShift And CmbProcess.Text = rngProcess And TextWorkOrder.Text = rngWorkOrder And TextSublot.Text = rngSublot Then
MsgBox "This entry has already been submitted!"
End If