View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mark Rosenkrantz Mark Rosenkrantz is offline
external usenet poster
 
Posts: 10
Default Userform Date validation

David;

Because of being in a hurry just a brief and not complete answer to your "
problem".

A part of your "check" can be something like this.
Here you check for a genuine dd/mm/yyyy dateformat.
Assuming your textbox is called tbStartDate.

If Not IsDate(.tbStartDate.Value) Then
Response = MsgBox(ErrNoStartdate, vbCritical + vbOKOnly, Title)
.tbStartDate.Value = "01/01/0001 ?"
.tbStartDate.SetFocus
Exit Sub
End If

Succes;
The other part will be solved by other members I hope.
Mark Rosenkrantz.


More Excel ? www.rosenkrantz.nl or





"David Goodall" wrote in message
...
Hi,
I'm currently developing a userform which has a text box that prompts the
user for a date of birth. I would like to validate the input as a correct
date of birth. ie not born before 1900 and in correct dd/mm/yyyy format.

I've had a look at the the isdate function but I'm not sure if it can

handle
the British date format.

Any help would be greatly appreciated.

David