isdate() will return a true/false
if not isdate(range("A1")) then Msgbox("NOT A DATE VALUE")
Just learnt this tick write some code that will run vb on a cell change
so in the vb part of that worksheet (not a Module) took me an 1/2 to work this out didn't read the help right LOL
Private Sub Worksheet_Change(ByVal Target As Range)
Dim checkdate as Boolean
select case Target.address
case "$A$1" ' a1 was change
checkdate = isdate(Target.Value) if its not a date value it will be false
if not checkdate then
Msgbox("this is not a date value")
now this can be in a module
msgbox("You inputed " & format(thisvalue,"mm/dd/yy") & " Date")
Last edited by myle; 05-17-11 at 05:47.
hope this help
the aim is store once, not store multiple times
Remember... Optimize 'til you die!
Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
VB-NET based on my own environment started 2007
SQL-2005 based on my own environment started 2008
YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.
DONT WORRY ABOUT THOSE WHO TALK BEHIND YOUR BACK
THEY'RE BEHIND YOU FOR A REASON