View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Stuart[_21_] Stuart[_21_] is offline
external usenet poster
 
Posts: 154
Default Getting user's Date from a Form

Many thanks, but I may not have explained correctly.

I wish to let the user specify a date (any date of their choice) but then
check it's validity against (eg):
it cannot be 30th February
it cannot be 32nd December
it cannot be 0th any Month
etc

Hope this is clearer.

Regards.

"Ron de Bruin" wrote in message
...
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.