View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Getting user's Date from a Form

Hi

You can test the day number is the same in the textbox and in the date you create with the
three textboxes

Use
If Day(DateSerial(Me.text1, Me.text2, Me.text3)) =daytextbox then

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Stuart" wrote in message ...
How do I get a date from a user, via a form, and then validate their entry, please?

I currently have textboxes and labels as follows:

.......... / ........... / ................
tbDay Lb tbMonth Lb tbYear

where "16/05/2005" would be validated, but
"30/02/2005" (for example) should not be validated........
don't remember 30 days in February anytime recently.

Surely there is an easier way than having to write all the validating code?

Regards.