I've used this code in the past on a workbook and I can't figure out why it's not working now. I can't even break the links by selecting the "Edit Links" button in the Ribbon and clicking Break Links in that prompt.
I've also tried
Code:
Sub BreakLinks()
Dim vLinks As Variant
Dim lLink As Long
' Define variable as an Excel link type.
vLinks = ActiveWorkbook.LinkSources(Type:=xlLinkTypeExcelLinks)
If vLinks = vbNullString Then Exit Sub
' Break all links in the active workbook.
For lLink = LBound(vLinks) To UBound(vLinks)
ActiveWorkbook.BreakLink _
Name:=vLinks(lLink), _
Type:=xlLinkTypeExcelLinks
Next lLink
End Sub
I've also tried
Code:
For Each TmpLinks In PasteTo_Wb.LinkSources
PasteTo_Wb.BreakLink Name:=TmpLinks, Type:=xlLinkTypeExcelLinks
Next