Name

workbook.UpdateLink([Name], [Type])

Synopsis

Updates a link in a workbook.

Argument

Settings

Name

The name of the link to update as returned by the LinkSources property.

Type

The xlLinkType of the link; possible settings are xlLinkTypeExcelLinks (default) or xlLinkTypeOLELinks.

The following code updates each of the Excel links in a workbook:

Dim link, linkSources
linkSources = ThisWorkbook.linkSources(xlExcelLinks)
If IsArray(linkSources) Then
    For Each link In linkSources
        ThisWorkbook.UpdateLink Name, XlLinkType.xlLinkTypeExcelLinks
    Next
End If

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.