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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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



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
OnTime method xlcharlie Excel Programming 1 February 11th 05 04:20 PM
ontime method? max Excel Programming 8 February 8th 05 09:04 PM
ontime method? max Excel Programming 2 February 7th 05 03:25 PM
ontime Method Bill Krone Excel Programming 1 August 12th 04 04:30 PM
Help me with OnTime Method dolegow Excel Programming 1 October 12th 03 01:52 AM


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