This topic has not yet been rated - Rate this topic

PivotTable.ChangeConnection Method

Office 2010

Changes the connection of the specified PivotTable.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
void ChangeConnection(
	WorkbookConnection conn
)

Parameters

conn
Type: Microsoft.Office.Interop.Excel.WorkbookConnection
Required WorkbookConnection object that represents the new connection for the PivotTable.

The ChangeConnection(WorkbookConnection) 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(WorkbookConnection) method is used with a PivotTable that uses data stored on a worksheet as its data source.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.