validation date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Anyone know where I can find code for validation of the
date. ie. user enters in mmddyyyy, I want to ensure that
the values they enter make sense (eg. month cannot be 33,
has to be between 1-12)

thx.
 
Try the isDate function.

if(isdate(your date))then
....do your thing
endif

or

if(not isdate(your date))then
Msgbox "This is not a valid date"
exit sub
endif

etc...

Hope that helps!

Kevin
 

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

Back
Top