Run a query in the background or while you wait
Running a query in the background allows you to use Microsoft Excel while the query runs.
- Click a cell in the external data range, and then click Data Range Properties on the External Data toolbar.
- Select the Enable background refresh check box to run the query in the background or clear it to run the query while you wait.
Notes
- Stop a query To stop a query from running when Enable background refresh is turned off, press ESC.
- Stop a background refresh To stop a query that is running in the background, double-click the Background Refresh icon on the status bar to display the External Data Refresh Status dialog box, and then click Stop Refresh.
- Recording a macro While you are recording a macro that includes a query, Excel will not run the query in the background. To change the recorded macro so that it runs in the background, edit the macro in the Visual Basic Editor and change the refresh method for the QueryTable object from "BackgroundQuery := False" to "BackgroundQuery := True". For information about editing macros, see Visual Basic Help.