Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
clock use
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
clock use
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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
clock use
You can use application.ontime, but then Excel has to be kept open. And at
least one workbook had to be opened to set this in motion. Chip Pearson has lots of info he http://www.cpearson.com/excel/OnTime.aspx If excel is not going to be open, maybe you can use a windows(?) scheduling program. Some versions of windows have them built in, but there are free (and $$) versions you can find via google. 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. -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
clock use
Ps. The excel program that starts the process can close after the OnTime is
run. But excel has to stay open. With the windows scheduling program, you'd have to have the PC on and allow macros to run (you are running macros in excel, right) when that scheduling starts excel with your workbook. 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. -- Dave Peterson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
clock use
You can use Edanmo's free task scheduler:
http://www.mvps.org/emorcillo/en/code/vb6/ It is at the bottom of the page. RBS "Dave Peterson" wrote in message ... You can use application.ontime, but then Excel has to be kept open. And at least one workbook had to be opened to set this in motion. Chip Pearson has lots of info he http://www.cpearson.com/excel/OnTime.aspx If excel is not going to be open, maybe you can use a windows(?) scheduling program. Some versions of windows have them built in, but there are free (and $$) versions you can find via google. 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. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Incremental time values based upon clock in and clock out times | Excel Discussion (Misc queries) | |||
Time Clock - Making sure they clock out | Excel Programming | |||
How do I calculate time in excel (clock in and clock out | Excel Discussion (Misc queries) | |||
Change EXCEL Clock to Standard Clock or Military Time | Excel Worksheet Functions | |||
Start Clock/Stop Clock | Excel Discussion (Misc queries) |