I'm trying to get the refresh date for a query table within Excel 2007 to use as a timestamp but am not getting any output when trying the following within the sheet containing the query table.
Private Sub QueryTable_AfterRefresh(Success As Boolean)
If Success Then
' Query completed successfully
Range("M1").Value = ListObject(1).QueryTable.RefreshDate
' Query failed or was cancelled
If I insert a msgbox, it doesn't get launched either so it looks like I'm missing something.