ChangeLink Method [Excel 2003 VBA Language Reference]
Changes a link from one document to another.
expression.ChangeLink(Name, NewName, Type)
expression Required. An expression that returns one of the objects in the Applies To list.
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.
XlLinkType
XlLinkType can be one of these XlLinkType constants. |
xlLinkTypeExcelLinksdefault |
xlLinkTypeOLELinks. Use for both DDE and OLE links. |
Example
This example changes a Microsoft Excel link.
ActiveWorkbook.ChangeLink "c:\excel\book1.xls", _
"c:\excel\book2.xls", xlExcelLinks
Applies to | Workbook Object