Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello-
I have a workbook that send out department stats out every hour to our management team. I need to add something (might be an IF statement) to run a seperate code if two conditions exist: The computer time is 9:05 The value of cell a6 is <0.03 If those conditions exist I would need to call a macro named SendStats3, a special macro that will alert our department admin via email that we need additional reporting done. I looked into the Application.ontime function but could not see how to apply it. Also, does it matter what the "seconds" are on the computer time? I did not want the computer time to need to be exact down to the second, just as long as the clock on the PC says 9:05. Thanks in advance for any help that you might offer up. Scott |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
You need the OnTime command, since you didn't show us your current code you would need something like this: This example runs my_Procedure at 5 P.M. Application.OnTime TimeValue("17:00:00"), "my_Procedure" within the sub my_procedure you would have your other condition. -- Thanks, Shane Devenshire "Sabosis" wrote: Hello- I have a workbook that send out department stats out every hour to our management team. I need to add something (might be an IF statement) to run a seperate code if two conditions exist: The computer time is 9:05 The value of cell a6 is <0.03 If those conditions exist I would need to call a macro named SendStats3, a special macro that will alert our department admin via email that we need additional reporting done. I looked into the Application.ontime function but could not see how to apply it. Also, does it matter what the "seconds" are on the computer time? I did not want the computer time to need to be exact down to the second, just as long as the clock on the PC says 9:05. Thanks in advance for any help that you might offer up. Scott |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Oct 15, 9:14*pm, ShaneDevenshire
wrote: Hi, You need the OnTime command, since you didn't show us your current code you would need something like this: This example runs my_Procedure at 5 P.M. Application.OnTime TimeValue("17:00:00"), "my_Procedure" within the sub my_procedure you would have your other condition. -- Thanks, Shane Devenshire "Sabosis" wrote: Hello- I have a workbook that send out department stats out every hour to our management team. I need to add something (might be an IF statement) to run a seperate code if two conditions exist: The computer time is 9:05 The value of cell a6 is <0.03 If those conditions exist I would need to call a macro named SendStats3, a special macro that will alert our department admin via email that we need additional reporting done. I looked into the Application.ontime function but could not see how to apply it. Also, does it matter what the "seconds" are on the computer time? I did not want the computer time to need to be exact down to the second, just as long as the clock on the PC says 9:05. Thanks in advance for any help that you might offer up. Scott- Hide quoted text - - Show quoted text - What if the time was not exactly at 5:00? My code starts running at 9:05 in the morning, but there is a lot of formatting that takes place prior to getting to the point where the workbook is emailed out. Does the Application.Ontime code need to be specific down to the seconds? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Time - Analysis based on time | Excel Discussion (Misc queries) | |||
Calculate Date based on Time | Excel Worksheet Functions | |||
Trying to take sample readings based on time | Excel Discussion (Misc queries) | |||
Run macro based on time | Excel Worksheet Functions | |||
change date based on time | Excel Discussion (Misc queries) |