Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default On Time Function

Hello All,
I want to run a procedure every x minutes. To test this, I am using the
following:

Application.OnTime EarliestTime:=Now + TimeValue("00:00:10"),
procedu="SeeifTimeisPass"

Then I have a sub:

Sub SeeifTimeisPass
msgbox "Hi"
end sub

It runs through one time, but then does not reschedule to run again (running
every 10 seconds in this example). Any ideas why.

Thanks,.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default On Time Function

OnTime only runs the code once. You have to reschedule the OnTime
method each time. See www.cpearson.com/excel/ontime.htm for
example code.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Bill" wrote in message
ink.net...
Hello All,
I want to run a procedure every x minutes. To test this, I am
using the following:

Application.OnTime EarliestTime:=Now + TimeValue("00:00:10"),
procedu="SeeifTimeisPass"

Then I have a sub:

Sub SeeifTimeisPass
msgbox "Hi"
end sub

It runs through one time, but then does not reschedule to run
again (running every 10 seconds in this example). Any ideas
why.

Thanks,.



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 there an XLS function to convert std time to Military time? Carl Excel Worksheet Functions 1 May 20th 09 09:48 PM
Macro / function text time to 24hr excel time passed midnight fortotaling hr's Russmaz Excel Worksheet Functions 2 March 6th 09 04:58 AM
verify use of TIME Function, Find Quantity Level compare to time-d nastech Excel Discussion (Misc queries) 9 July 11th 07 01:58 PM
Function Call Specified at Run Time rather than Compile Time? Mac Lingo[_2_] Excel Programming 1 September 8th 05 04:20 PM
Function to convert Time String to Time Andibevan Excel Worksheet Functions 6 August 19th 05 01:19 PM


All times are GMT +1. The time now is 03:33 PM.

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"