Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 1.09 KB

Excel.PivotTable.ChangeConnection.md

File metadata and controls

39 lines (23 loc) · 1.09 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
PivotTable.ChangeConnection method (Excel)
vbaxl10.chm235183
vbaxl10.chm235183
Excel.PivotTable.ChangeConnection
189c7ccc-d31c-dae8-f203-d590d1e46b82
05/08/2019
medium

PivotTable.ChangeConnection method (Excel)

Changes the connection of the specified PivotTable object.

Syntax

expression.ChangeConnection (conn)

expression A variable that represents a PivotTable object.

Parameters

Name Required/Optional Data type Description
conn Required WorkbookConnection A WorkbookConnection object that represents the new connection 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 occurs if the ChangeConnection method is used with a PivotTable that uses data stored on a worksheet as its data source.

[!includeSupport and feedback]