S
shikarishambu
Hi,
I have a VBA function in excel that checks a date field to see if it is
null/ in past or in future.
The problem is even if the filed is blank the function returns info stating
it is in the past
Here is the function
Function CheckDate(dtTest as Date)
If Len(Trim(dtTest)) = 0 Then 'Tried IsNull - did not work
CheckDate = "BLANK"
ElseIf dtTest < Date Then
CheckDate = "PAST"
Else
CheckDate = "Future"
End If
Is there a way to check if the date field is "empty'
TIA
I have a VBA function in excel that checks a date field to see if it is
null/ in past or in future.
The problem is even if the filed is blank the function returns info stating
it is in the past
Here is the function
Function CheckDate(dtTest as Date)
If Len(Trim(dtTest)) = 0 Then 'Tried IsNull - did not work
CheckDate = "BLANK"
ElseIf dtTest < Date Then
CheckDate = "PAST"
Else
CheckDate = "Future"
End If
Is there a way to check if the date field is "empty'
TIA