ChangeLink Method
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.
Type Optional XlLinkType. The link type.
XlLinkType can be one of these XlLinkType constants. |
xlLinkTypeExcelLinks default |
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