Timer

T

TH

Question#1. Is there a way (an event?) to recognize when a certain time of
day comes (let's say 8PM) without anything else happening?

I have a workbook that gets real-time stock market data via DDE (I think
that's what it's called). Anyhow with a command like this =WINROS|LAST!qqq
in a cell and the vendor's program running, the spreadsheet gets real-time
updates. After 8PM I would like to save the current values and insert a line
for the next day without no user intervention. There is some after hours
market activity, but I can't count on any changes after 8 (I'm using 8PM
since I WANT the last values after all changes are done). So, using a CHANGE
event or a CHANGE_SELECTION event will probably not work. I found the TIMER
function, but I don't see how to use it for this as isn't an event.

All solutions will be appreciated.

Question#2. Does anyone have a routine to CALCULATE holidays? It would be
nice to know of market holidays so I can skip them along with weekends for
the above routine.

Thanks.

Terry
 
J

J.E. McGimpsey

TH said:
Question#1. Is there a way (an event?) to recognize when a certain time of
day comes (let's say 8PM) without anything else happening?

I have a workbook that gets real-time stock market data via DDE (I think
that's what it's called). Anyhow with a command like this =WINROS|LAST!qqq
in a cell and the vendor's program running, the spreadsheet gets real-time
updates. After 8PM I would like to save the current values and insert a line
for the next day without no user intervention. There is some after hours
market activity, but I can't count on any changes after 8 (I'm using 8PM
since I WANT the last values after all changes are done). So, using a CHANGE
event or a CHANGE_SELECTION event will probably not work. I found the TIMER
function, but I don't see how to use it for this as isn't an event.

All solutions will be appreciated.

Question#2. Does anyone have a routine to CALCULATE holidays? It would be
nice to know of market holidays so I can skip them along with weekends for
the above routine.

Check out the OnTime method in Help. And look here:

http://www.cpearson.com/excel/ontime.htm


In principle, it should be relatively straightforward to calculate
holidays - you can search the archives:

http://google.com/advanced_group_search?q=group:*excel*

for routines to calculate the closest Monday to a particular date,
for instance. Easter can be calculated:

http://www.cpearson.com/excel/holidays.htm#Easter

However, I suspect the work involved in coding this probably exceeds
the time you'll save over simply compiling a list of dates, over the
likely useful life of the workbook. You could put a list in a column
of a hidden sheet, then check the date against that list.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top