April 2006
Beginner
1114 pages
98h 16m
English
querytable.Destination
Returns a Range object containing the cell in the upper-lefthand corner of the query table.
The following code selects the first cell of a query table on the active worksheet and asks if the user wants to delete it:
For Each qt In ActiveSheet.QueryTables
qt.Destination.Select
If MsgBox("Delete query table?", vbYesNo) = vbYes Then
If qt.Refreshing Then qt.CancelRefresh
qt.ResultRange.Clear
qt.Delete
End If
NextRead now
Unlock full access