This documentation is archived and is not being maintained.

PivotTable.ChangeConnection Method

Office 2007
Changes the connection of the specified PivotTable.

Version Information
 Version Added:  Excel 2007

Syntax

expression.ChangeConnection(conn)

expression   A variable that represents a PivotTable object.

Parameters

NameRequired/OptionalData TypeDescription
connRequiredWorkbookConnectionA WorkbookConnection object that repesents the new conneciton for the PivotTable.

Remarks

The ChangeConnection method can only be used with a PivotTable that is connected to an external data source. A run-time error will occur if the ChangeConnection method is used with a PivotTable that uses data stored on a worksheet as its data source.




Show: