title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
Workbook.ChangeLink method (Excel) |
vbaxl10.chm199083 |
|
|
9b2c0b82-73ff-3bdb-63df-82c0708cb703 |
05/29/2019 |
medium |
Changes a link from one document to another.
expression.ChangeLink (Name, NewName, Type)
expression A variable that represents a Workbook object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Name | Required | String | The name of the Microsoft Excel or DDE/OLE link to be changed, as it was returned from the LinkSources method. |
NewName | Required | String | The new name of the link. |
Type | Optional | XlLinkType | The link type. |
This example changes a Microsoft Excel link. This example assumes that at least one formula exists in the active workbook that links to another Excel source.
ActiveWorkbook.ChangeLink "c:\excel\book1.xls", _
"c:\excel\book2.xls", xlExcelLinks
[!includeSupport and feedback]