Link to home
Start Free TrialLog in
Avatar of tdbj
tdbj

asked on

Excel 2007 Query Table refresh date

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
    Else
        ' Query failed or was cancelled
    End If
End Sub

If I insert a msgbox, it doesn't get launched either so it looks like I'm missing something.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of MAdS
MAdS

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial