Web Query

A

Alan

Hi,
I'm not really sure if this an Excel issue but here goes. I have a file set
up that gathers data from a web page. It updates web hits and other data
from the page on a daily basis, the only problem I have is that I either
have to leave the file open 24/7 or manually open it each day.
I've no problem using code to place the updated data into the appropriate
date columns and saving, it does that already, but is there any way of
getting an Excel file to open automatically at a specified time, update
itself via the code and then save and close?
TIA
Regards,
Alan.
Office XP2003
Vista Home Premium
 
D

DS-NTE

Tak a look at START - SETTINGS - CONTROL PANEL - SCHEDULED TASKS
You can schedule the workbook to open once a day and via a macro, Sub
Auto_Open(), do the necessary updates.


HTH
knut
 
A

Alan

Thanks for that, I found it eventually, in Vista it's in 'Administrative
Tools', I think I remember seeing Scheduled Tasks in the Control Panel in XP
but I never used it.
Anyway, I have the file opening once per day and I have the code finished
and ready to do the necessary, update certain columns, save and close the
file. I have the web query on one sheet and the information is transferred
to another sheet using various formulas, mainly text formulas to extract
actual numbers from text strings.
The problem I have now is that whether I set the Web Query to update on
opening or I use code to update it, the rest of the code runs and completes
before the Web Query updates are copied to the various locations, so
although the actual web data gets updated, my result sheet does not.
Is there any way to put a hold on the code running until the web query is
complete?
Regards,
Alan.
 
Top