#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 410
Default Error Check Dates

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 320
Default Error Check Dates

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.

"jlclyde" wrote:

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

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
If statement error check lghovden06 Excel Worksheet Functions 1 July 9th 08 11:05 PM
macro custom error check RussTheBear Excel Discussion (Misc queries) 0 January 30th 08 05:17 AM
How can I check whether a column of dates are all before today's d PaladinWhite Excel Worksheet Functions 3 October 21st 07 05:52 PM
How can I check whether a column of dates are all before today's d PaladinWhite Excel Worksheet Functions 1 October 20th 07 04:50 AM
Error Msg 400 - Macro Spell Check Rog Excel Discussion (Misc queries) 2 December 13th 06 07:09 PM


All times are GMT +1. The time now is 05:48 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"