Thread: clock use
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default clock use

forgot to mention...
what ever method you finally choose, put the code in the workbook open event
or the before close event

regards
FSt1

"FSt1" wrote:

hi
a quick dirty way might be something like this....
with a date in C2....
Sub ttttt()
If Now c2 Then 'or another cell
[A2].Value = "now" 'do something
Else
[A2] = "not now" 'do something else
End If
'MsgBox Now 'test compare
End Sub

there are other ways to zero in on a date or day.
If Weekday(Now()) = 2 'it's monday
do something
else
do something esle
end if

you could also look it the ontime event. see this site...
http://www.cpearson.com/excel/OnTime.aspx

lot of ways to handle this one.

regards
FSt1

"Curt" wrote:

Is there a way to use the internal clock to take an action on a program on a
certain date. This would need to happen with the program closed or open.