Need help figuring out how to compare dates within textboxes. Having problems when certain textboxes are blank.
Sub Tdater3()
If UserForm1.Order1.Value = "" Then
UserForm1.Days3.Value = ""
Exit Sub
End If
If UserForm1.Date2.Value And UserForm1.Order1.Value = True Then
UserForm1.Days3.Value = CDate(UserForm1.Date2.Value) - CDate(UserForm1.Order1.Value)
End If
If UserForm1.Date2.Value = False And UserForm1.Order1.Value = True Then
UserForm1.Days3.Value = CDate(UserForm1.TDate1.Value) - CDate(UserForm1.Order1.Value)
End If