Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check the Date
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check the Date
Sub ifdate()'where c5 has your desired date If Date Range("c5") Then MsgBox "Hi" End Sub -- Don Guillett SalesAid Software "stewdizzle" wrote in message ups.com... 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? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check the Date
That worked perfectly Gary's student...thanks
On Feb 4, 9:52 am, Gary''s Student wrote: 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date Check | Excel Programming | |||
Check date and act on it | Excel Programming | |||
Change text to date and check against date in cell | Excel Programming | |||
Check for date | Excel Programming | |||
Check date | Excel Programming |