Rediger

ListObject.Refresh method (Excel)

Refreshes the data in the list.

For a list that's linked to a SharePoint site, retrieves the current data and schema for the list from the server that is running Microsoft SharePoint Foundation. If the SharePoint site is not available, calling this method returns an error.

For a list that's loaded from a query created with Power Query, refreshes the list by evaluating the query.

For a list that has no data connection, such as a list created from a range of cells, calling this method returns an error.

Syntax

expression.Refresh

expression A variable that represents a ListObject object.

Remarks

For a list that's linked to a SharePoint site, calling the Refresh method does not commit changes to the list in the Excel workbook. Uncommitted changes in the list in Excel are discarded when the Refresh method is called.

For a list that's loaded from a query created with Power Query, whether errors are returned depends on the BackgroundQuery property of the list's QueryTable object. If it's False, the method doesn't return until the refresh completes, and if the query can't be evaluated, the method returns an error, as the Refresh method of the QueryTable object does. If it's True, the method returns before the refresh completes, and errors that occur during the refresh aren't returned to the calling code.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.