Hi,
Does anyone know how to break all links using VBA quickly? I am using Excel 2003.
For some reason this code does not work for me, which I have been finding all over the internet.
Thank You!
</PRE>
Does anyone know how to break all links using VBA quickly? I am using Excel 2003.
For some reason this code does not work for me, which I have been finding all over the internet.
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
Thank You!
</PRE>
Last edited: