I have a workbook with a multiple queries from an SQL database and wanted to get the last refreshed date/time as either a variable in VBA or written to a cell in the workbook.
I tried this code:
Cells(1,1) = ActiveWorkbook.Connections("Query - Item_Groups").ODBCConnection.RefreshDate
But I get I get an Application Defined or Object Defined error.
Any thoughts?