What is the best way to get query objects updated

T

tempest

Hi all.

I have a created some workbooks containing query objects which will
retrieve data from a SQL database. What is the best way to refresh
data from the database *without* opening the workbooks manually in
Excel?

The obvious solution to me is to write a small VB program (not VBA)
that will open, refresh queried data, and save the workbook
periodically.

Any info would be appreciated.
Thanks.
 
T

tempest

Is there any point in refreshing a closed workbook? Surely no one will
be interested in the vintage of the data until they open it (unless you
are using the closed workbooks as a data source for something else). A
better approach might be to have code called from the workbook itself
to refresh the data on opening then periodically until the workbook
closes.

Well, here is the problem I'm facing:

The two sets of workbooks are used by two different group of users.
The users using the workbooks that contain query objects may not
necessary open the workbooks everyday. So in order for the second set
of workbooks to show the most recent data, it would require users of
the first set of workbooks to open and save their workbooks on a daily
basis just to get the queried data refreshed.

I am aware that query objects can periodically refresh data from
datasources but only as long as their workbooks are opened in Excel.

FYI, the second set of workbooks do not have query objects for two
reasons:
1) The users do not have access to SQL database no the know-how to
create query objects.
2) They just want to reference data from the first set of workbooks.

Anyway. I have done a little more research last night and I think the
only solution to my problem is to create a stand-alone VB program to
open and save the workbooks and add the program to the sysem scheduler
to run everyday.

-JL
 

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