Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel/Visual Basic
I am using the timer function in a macro to re-run a web query after a set
amount of time. I am using this to continuously update the current weather and company stock prices for a "Video Bulletin Board. The problem is, the macro aborts every night at 11:59. Can anyone tell me why this is happening and how to fix it? Thanks in advance. Mike |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel/Visual Basic
Without seeing your code, it's hard to tell, but I suspect the reason is
that you're using a comparision, e.g.: If Time oldTime + TimeSerial(0, 1, 0) Then ... Since Time is actually a value based on fractional days (e.g., 0:00 = 0, 12:00 = 0.5, 11:59 PM = 0.999305555555556), the comparison will fail at midnight. You might consider using an OnTime macro, instead: http://cpearson.com/excel/ontime.htm In article , "MikeS" wrote: I am using the timer function in a macro to re-run a web query after a set amount of time. I am using this to continuously update the current weather and company stock prices for a "Video Bulletin Board. The problem is, the macro aborts every night at 11:59. Can anyone tell me why this is happening and how to fix it? Thanks in advance. Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel and its Visual Basic IDE | Excel Discussion (Misc queries) | |||
Is Visual Basic the same as Visual Studio 2008? | Excel Worksheet Functions | |||
changing the visual basic in office 2003 to visual studio net | Excel Discussion (Misc queries) | |||
Excel/Visual Basic | Excel Programming | |||
excel/visual basic | Excel Programming |