Private Sub CommandButton1_Click() If TextBox1 = vbNullString Then Exit Sub If IsDate(TextBox1) Then TextBox1 = Format(TextBox1, "Short Date") Else MsgBox "Non valid date" Cancel = True End If End Sub
Comment