Error Check Dates

J

jlclyde

I have a user form that I would like people to enter dates, I woudl
like to check to make sure that they are indeed dates. What is the
error checking for this? Could someone help with this?

Thanks,
Jay
 
B

Bob Umlas, Excel MVP

IF ISDATE(me.Textbox1.Text) then...

but you may want to further check years, because you MIGHT have a year of
3081, so maybe
IF Isdate(me.textbox1.Text) then
IF Year(me.textbox1.text)>2100 then 'arbitrary year here
MsgBox "Invalid Date"
etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top