Name
workbook.BreakLink(Name, Type)
Synopsis
Breaks links to other workbooks or OLE objects. When a link is broken, the data is retained at the site of the link, but the ability to refresh the data from its source is lost.
|
Argument |
Settings |
|---|---|
|
|
The name of the link to break. Link names are returned by the |
|
|
Use |
For example, the following code iterates through the Excel links in a workbook and asks the user whether each link should be broken:
Dim link, linkSources
linkSources = ThisWorkbook.linkSources(xlLinkTypeExcelLinks)
If IsArray(linkSources) Then
For Each link In linkSources
If MsgBox("Break link to " & link) = vbOK Then _
ThisWorkbook.BreakLink link, xlLinkTypeExcelLinks
Next
End IfBecome an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access