Private Sub UserForm_Initialize()
TextBox3 = Date
If TextBox3.Value > DateValue(TextBox1.Text) Then
TextBox1.BackColor = RGB(255, 0, 0)
Else
TextBox1.BackColor = RGB(255, 255, 255)
End If
End Sub
Private Sub TextBox1_Change()
If Not IsDate(TextBox1) Then Exit Sub
If TextBox3.Value > CDate(TextBox1.Value) Then
TextBox1.BackColor = RGB(255, 0, 0)
Else
TextBox1.BackColor = RGB(255, 255, 255)
End If
End Sub
Private Sub UserForm_Initialize()
TextBox3 = Date
TextBox1 = ""
End Sub