Refreshing data from ODBC automatically?

J

John E.P. Hynes

Greetings,

I have a spreadsheet containing a macro that fills in cells with data
fetched from an SQL database via ODBC.

How do I get the data to refresh automatically if the source SQL data
changes? For example:

Someone opens the sheet, the macro fires, and the sheet is filled with data.
Then, someone else adds data to the source SQL table, and... I'd like the
sheet to update automatically. I guess this would involve a sort of
persistent ODBC connection, but I have no idea how to go about this.

Thanks for any suggestions!

-John
 
D

Dick Kusleika

John

I think the best you can do is refresh the querytable when the workbook
opens, then refresh every x minutes. If nothing has changed, then the
workbook won't change and you only lose a little processing time.
 

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