Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default validation date

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default validation date

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
-----Original Message-----
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.
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DATE VALIDATION William Excel Discussion (Misc queries) 4 August 7th 08 02:31 PM
date validation Bri Excel Worksheet Functions 3 January 22nd 06 06:52 PM
Date Validation - Must equal Sundays date jeridbohmann Excel Discussion (Misc queries) 14 November 30th 05 08:40 PM
Date Colum Date Formatting & Validation Mike[_81_] Excel Programming 1 June 7th 04 01:59 AM
Date Validation Nigel[_5_] Excel Programming 5 October 30th 03 05:09 PM


All times are GMT +1. The time now is 01:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"