HI
See this from VBA help in Excel.
<TABLE id=topTable width="100%"><TBODY><TR id=headerTableRow2><TD align=left>
IsDate Function</TD></TR></TBODY></TABLE>
Returns a
Boolean value indicating whether an
expression can be converted to a date.
Syntax
IsDate(expression)
The required
expression argument is a
Variant containing a
date expression or
string expression recognizable as a date or time.
Remarks
IsDate returns
True if the expression is a date or is recognizable as a valid date; otherwise, it returns
False. In Microsoft Windows, the range of valid dates is January 1, 100 A.D. through December 31, 9999 A.D.; the ranges vary among operating systems.
Example
This example uses the
IsDate function to determine if an expression can be converted to a date.
<TABLE><TBODY><TR><TD>
<CODE>Dim MyDate, YourDate, NoDate, MyCheckMyDate = "February 12, 1969": YourDate = #2/12/69#: NoDate = "Hello"MyCheck =
IsDate(MyDate
) ' Returns True.MyCheck =
IsDate(YourDate
) ' Returns True.MyCheck =
IsDate(NoDate
) ' Returns False.</CODE></PRE></TD></TR></TBODY></TABLE>
<xml>ofm</xml>
© 2010 Microsoft Corporation. All rights reserved.