Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is Visual Basic the same as Visual Studio 2008? Mike Stewart Excel Worksheet Functions 5 January 11th 09 04:58 PM
Visual BASIC in Excel Emerogork via OfficeKB.com Excel Worksheet Functions 1 August 27th 07 04:53 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM
visual basic in excel - DKehl Excel Discussion (Misc queries) 2 March 23rd 05 07:23 PM
Excel visual basic pacheco Excel Programming 1 October 6th 04 09:29 PM


All times are GMT +1. The time now is 08:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"