Refreshing data from ODBC automatically?

  • Thread starter Thread starter John E.P. Hynes
  • Start date Start date
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
 
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.
 
Back
Top