View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Luis Verme Luis Verme is offline
external usenet poster
 
Posts: 8
Default Validating Dates

Hi guys.
Thank you for all your suggestions. As Norman said, I changed to a 4 digit
year date and worked fine.

Thanks again

Luis Verme
"Norman Jones" escribió en el mensaje
...
Hi Luis,

I tried:

Sub Tester01()
MsgBox IsDate("31/6/2005")
MsgBox IsDate("30/6/2005")
MsgBox IsDate("31/02/2005")
End Sub

and received the responses: False True False - as expected

However, trying:

Sub Tester02()
MsgBox IsDate("31/6/05")
MsgBox IsDate("30/6/05")
MsgBox IsDate("31/02/05")
End Sub

I received a True response in each case, which surprised me.

In any event, using the full 4-digits for the year I could not reproduce
your experience.


---
Regards,
Norman



"Luis Verme" wrote in message
...
But of course it still doesn't work

"Luis Verme" escribió en el mensaje
...
Oops.
It's

If IsDate(txtFFinal) Then
MsgBox "Date is correct"
else
MsgBox "Date is incorrect"
End If

escribió en el mensaje
oups.com...
Hi Luis,

If I am reading your code correctly any date you pass it will be
correct, both sides of your if statement are the same?

Regards,

James