Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel 2003, WinXP Home
In VBA: I want to validate the ActiveCell entry for a date. I learned before that the IsDate function finds a valid date in just about everything. I learned to use the DateValue(ActiveCell) for this purpose. But the only way I can see to trap the error is to use an On Error GoTo Err trap and set the DateValue to something like: a = DateValue(ActiveCell) to force an error. That works fine but it seems a round-about way to get there. What I was hoping for was something like: If IsError(DateValue(ActiveCell)) Then........ But this triggers a Type Mismatch. How do I trap the error without the round-about method above? Thanks for your help. Otto |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error.Type or IsError to trap #VALUE! and #NUM! | Excel Worksheet Functions | |||
Cleaner Error trap in Loop. | Excel Discussion (Misc queries) | |||
Error trap with object variable problem | Excel Programming | |||
error trap | Excel Programming |