Thread: Check the Date
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Check the Date

Sub qwerty()
d = DateValue("2/15/2007")
MsgBox (d)
If Now() d Then
MsgBox ("after the date")
Else
MsgBox ("not there yet")
End If
End Sub
--
Gary''s Student
gsnu200703


"stewdizzle" wrote:

I would like a VB code that will check the current date and then
perform an action. Something to the effect of:

SUB
IF today's date is after February 15, 2007 THEN
do this
ELSE
do that
END IF
END SUB

Is it possible?