![]() |
Ontime method, quick question.
Hi, I need to run "getprice" 3 times during the day. The way I will do it at the moment would be to use the line shown below 3 times with the different times. Application.OnTime TimeValue("06:00:00"), "getPrice" I was wondering if it was possible to just use one line, kind of like that shown below, which I know won't work, but shows what I want to do. Application.OnTime TimeValue("06:00:00"),TimeValue("12:00:00"), TimeValue("16:00:00"), "getPrice" Thanks Tom -- Tomski ------------------------------------------------------------------------ Tomski's Profile: http://www.excelforum.com/member.php...o&userid=26824 View this thread: http://www.excelforum.com/showthread...hreadid=570279 |
Ontime method, quick question.
Perhaps
application.OnTime Now + application.choose(int(int((now-int(now))*24)/6),timeserial(6,0,0),timeseria l(12,0,0),timeserial(8,0,0),timeserial(6,0,0)), "getPrice" -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Tomski" wrote in message ... Hi, I need to run "getprice" 3 times during the day. The way I will do it at the moment would be to use the line shown below 3 times with the different times. Application.OnTime TimeValue("06:00:00"), "getPrice" I was wondering if it was possible to just use one line, kind of like that shown below, which I know won't work, but shows what I want to do. Application.OnTime TimeValue("06:00:00"),TimeValue("12:00:00"), TimeValue("16:00:00"), "getPrice" Thanks Tom -- Tomski ------------------------------------------------------------------------ Tomski's Profile: http://www.excelforum.com/member.php...o&userid=26824 View this thread: http://www.excelforum.com/showthread...hreadid=570279 |
Ontime method, quick question.
Cheers for the idea, thought it looked like a possibillity, but the thought of a diifferent way using a public (date)variable which coul be updated after each execution of the method. This seems to be just what I want. But thanks ever so much for th suggestion. -- Tomsk ----------------------------------------------------------------------- Tomski's Profile: http://www.excelforum.com/member.php...fo&userid=2682 View this thread: http://www.excelforum.com/showthread.php?threadid=57027 |
Ontime method, quick question.
Ah well you asked for it in one line, so that is what I set out to achieve.
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Tomski" wrote in message ... Cheers for the idea, thought it looked like a possibillity, but then thought of a diifferent way using a public (date)variable which could be updated after each execution of the method. This seems to be just what I want. But thanks ever so much for the suggestion. T -- Tomski ------------------------------------------------------------------------ Tomski's Profile: http://www.excelforum.com/member.php...o&userid=26824 View this thread: http://www.excelforum.com/showthread...hreadid=570279 |
Ontime method, quick question.
Thats a good point, I should have phrased the question differently. Still, that is something that I wanted to know and hence it will be useful in the future. Thanks T -- Tomski ------------------------------------------------------------------------ Tomski's Profile: http://www.excelforum.com/member.php...o&userid=26824 View this thread: http://www.excelforum.com/showthread...hreadid=570279 |
Ontime method, quick question.
I know, I was only teasing.
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Tomski" wrote in message ... Thats a good point, I should have phrased the question differently. Still, that is something that I wanted to know and hence it will be useful in the future. Thanks T -- Tomski ------------------------------------------------------------------------ Tomski's Profile: http://www.excelforum.com/member.php...o&userid=26824 View this thread: http://www.excelforum.com/showthread...hreadid=570279 |
All times are GMT +1. The time now is 05:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com