La siguientes rutinas, cambia de color al textbox, regresa al usuario al mismo TextBox y le permite solo se equivoque 2 veces, si esto sucede entonces en forma predeterminada escribe la fecha actual.
-   
- Private Sub txtFechaDeLaHistoria_GotFocus() 
-     txtFechaDeLaHistoria.BackColor = &HC0FFFF 
- End Sub 
-   
- Private Sub txtFechaDeLaHistoria_LostFocus() 
-     Static Cnt As Integer 
-     If Not IsDate(txtFechaDeLaHistoria.Text) Then 
-         gstrMsg = "La fecha de la nota de consulta no es válida. Ejemplo: 24/12/2005 (día/mes/año)" 
-         MsgBox gstrMsg, vbCritical, gstrAppTitle 
-         If txtFechaDeLaHistoria.Text = "" Then 
-             txtFechaDeLaHistoria.Text = Format(Date, "dd/mm/yyyy") 
-         End If 
-         If Cnt >= 1 Then 
-             txtFechaDeLaHistoria.Text = Format(Date, "dd/mm/yyyy") 
-             Cnt = 0 
-         End If 
-         Cnt = Cnt + 1 
-         txtFechaDeLaHistoria.SetFocus 
-         Exit Sub 
-     End If 
-     txtFechaDeLaHistoria.BackColor = &H80000005 
- End Sub 
-   
-   
-----------------------------------------------------------
