I'm creating a database of a library, I created a macro to check if the expiry date of the request that the user made has already passed, if this has happened the cell value should be "Expired Term" otherwise it should be "Pending" , but when the program executes the macro it always shows the value "Pending", can someone help me?
VBA Code:
Public Sub Confirm_Data()
Dim c As Long, all_registers As Long
Application.ScreenUpdating = False
ActiveWorkbook.Sheets("Requisições").Activate
all_registers = Cells(Rows.Count, "B").End(xlUp).Row
For c = 2 To all_registers
Select Case True
Case Format(Now, "dd/mm/yyyy") < Cells(c, 8).Value
Cells(c, 9).Value = "Prazo Expirado"
Case Format(Now, "dd/mm/yyyy") >= Cells(c, 8).Value
Cells(c, 9).Value = "Pendente"
End Select
Next c
Application.ScreenUpdating = True
End Sub