title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
PivotTable.ChangeConnection method (Excel) |
vbaxl10.chm235183 |
|
|
189c7ccc-d31c-dae8-f203-d590d1e46b82 |
05/08/2019 |
medium |
Changes the connection of the specified PivotTable object.
expression.ChangeConnection (conn)
expression A variable that represents a PivotTable object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
conn | Required | WorkbookConnection | A WorkbookConnection object that represents the new connection for the PivotTable. |
The ChangeConnection method can only be used with a PivotTable that is connected to an external data source. A run-time error occurs if the ChangeConnection method is used with a PivotTable that uses data stored on a worksheet as its data source.
[!includeSupport and feedback]