Excel: IsDate Function (VBA only)
In Excel, the IsDate function returns TRUE if the expression is a valid date. Otherwise, it returns FALSE.
The syntax for the IsDate function is:
IsDate( expression )
expression is a variant.
Applies To:
- Excel 2007, Excel 2003, Excel XP, Excel 2000
For example:
IsDate("1/3/2004") would return TRUE IsDate("Tech on the Net") would return FALSE IsDate("January 3, 2004") would return TRUE
VBA Code
The IsDate function can only be used in VBA code. For example:
Dim LValue As Boolean
LValue = IsDate("Tech on the Net")
In this example, the variable called LValue would contain FALSE as a value.