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 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default 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
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
Excel and its Visual Basic IDE TJMonti Excel Discussion (Misc queries) 0 April 20th 09 04:14 PM
Is Visual Basic the same as Visual Studio 2008? Mike Stewart Excel Worksheet Functions 5 January 11th 09 04:58 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM
Excel/Visual Basic MikeS[_2_] Excel Programming 3 October 12th 04 05:44 PM
excel/visual basic Mara[_2_] Excel Programming 3 October 10th 03 07:37 PM


All times are GMT +1. The time now is 09:52 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"