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 use this to update weather information and the current company stock price 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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel/Visual Basic
Probably because the time gets reset to 0 at midnight. Are you using an OnTime
macro for this? If not, you could try it. With that approach, the last line of the macro typically sets up the next run, at a specific time. That time can include a date. That would take care of the midnight problem. On Tue, 12 Oct 2004 06:51:04 -0700, "MikeS" wrote: I am using the "timer function" in a macro to re-run a web query after a set amount of time. I use this to update weather information and the current company stock price 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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel/Visual Basic
I'm not sure if I fully understand your reply. I'm not actually using a
fixed or set time - I am having it loop back to the beginning after a set number of seconds. I was thinking more along the lines of using an "error" or "onerror" function to call another macro in (the event of an error) that would restart the original macro. I know you can do this in Access but I'm not sure how or if this will work in Excel. Can you elaborate on this? Thanks MikeS "Myrna Larson" wrote: Probably because the time gets reset to 0 at midnight. Are you using an OnTime macro for this? If not, you could try it. With that approach, the last line of the macro typically sets up the next run, at a specific time. That time can include a date. That would take care of the midnight problem. On Tue, 12 Oct 2004 06:51:04 -0700, "MikeS" wrote: I am using the "timer function" in a macro to re-run a web query after a set amount of time. I use this to update weather information and the current company stock price 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. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel/Visual Basic
Can you post the code? Have you used a Timer control? I am suggestion that you
use an OnTime macro. Check it out in Help. Basically, you set a fixed time for the macro to run. When that happens, the last line in the macro "schedules" the next run, based on the current date and time plus the required number of seconds. On Tue, 12 Oct 2004 07:17:05 -0700, "MikeS" wrote: I'm not sure if I fully understand your reply. I'm not actually using a fixed or set time - I am having it loop back to the beginning after a set number of seconds. I was thinking more along the lines of using an "error" or "onerror" function to call another macro in (the event of an error) that would restart the original macro. I know you can do this in Access but I'm not sure how or if this will work in Excel. Can you elaborate on this? Thanks MikeS "Myrna Larson" wrote: Probably because the time gets reset to 0 at midnight. Are you using an OnTime macro for this? If not, you could try it. With that approach, the last line of the macro typically sets up the next run, at a specific time. That time can include a date. That would take care of the midnight problem. On Tue, 12 Oct 2004 06:51:04 -0700, "MikeS" wrote: I am using the "timer function" in a macro to re-run a web query after a set amount of time. I use this to update weather information and the current company stock price 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is Visual Basic the same as Visual Studio 2008? | Excel Worksheet Functions | |||
Visual BASIC in Excel | Excel Worksheet Functions | |||
changing the visual basic in office 2003 to visual studio net | Excel Discussion (Misc queries) | |||
visual basic in excel - | Excel Discussion (Misc queries) | |||
Excel visual basic | Excel Programming |