I have a UserForm with a text box that receives the following macro:
Code
Private Sub txtDueDate_Change ()
On Error Resume Next
If CDate (txtDateToday) <= CDate (txtDueDate) Then
txtStatus = "OK"
Else: txtStatus.Value = Abs (DateDiff ("d", CDate (txtDateToday), CDate (txtDueDate)))
End If
End Sub
What we should do, when we opening the worksheet, the column "P" in the worksheet be automatically update with date difference.