
Validar fecha
Publicado por Agustin (11 intervenciones) el 06/08/2015 21:24:07
Hola, quiero validar la fecha pero al momento de ingresar una fecha con día anterior a 12 y un mes invalido (13 en adelante) me invierte los valores en el código y me deja un formato 12/13/YYYY, quiero que me diga que la fecha es incorrecta. Este es mi codigo ahora
1
2
3
4
5
6
7
8
9
10
11
12
13
If KeyAscii = 13 Then
SendKeys "{tab}"
KeyAscii = 0
txtfecalta.Text = Format(txtfecalta, "##/##/####")
If txtfecnac <> "" Then
If IsDate(txtfecalta) = False Then
MsgBox "Lo siento fecha incorrecta, ingrese solo numeros.", vbInformation, "Atención!"
txtfecalta.Text = ""
End If
Else
MsgBox "Debe ingresar fecha de alta"
End If
End If
Valora esta pregunta


0