How to break an external link that won't break

Anonymous
2012-01-11T18:42:31+00:00

I have studied all the Excel help available and followed the advice, but I have encountered an external link in an Excel 2010 workbook that simply will not break. No matter how many times I select "Break Link," this zombie is always there. I have tried deleting range names that came from the source file, to no avail. I "break the link" in the destination file, save, close the file, reopen it -- and the link is still there. I have tried adjusting the options every which way, no luck.

How do I absolutely, positively, completely and forever, send this link to Davy Jones's locker?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2012-12-04T08:40:04+00:00

Dear Long_John_Silver

I had a similar issue and in addition to Raju S Das' recommendation, I have also checked the data validations for various fields; this is where I found some zombie links that were not required anymore.

Maybe you can find some in your file too and remove them:

  • Select the cells where you expect the zombie data validation (I could narrow it down to one section on a specific worksheet)
  • In the Data Tools section of the Data ribbon, select Data Validation from the Data Validation dropdown
  • Check if there is any list validation with a reference to a linked file location.

Hope this helps.

Best regards,

Roger

Was this answer helpful?

300+ people found this answer helpful.
0 comments No comments

69 additional answers

Sort by: Most helpful
  1. Anonymous
    2016-04-21T21:34:51+00:00

    These are good suggestions for places to look. Still, it begs the question: *Shouldn't clicking the "Break Links" button look for all of these and clear them at once?*That is, the button says "Break Links," so that is what it should do.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2016-01-13T13:56:35+00:00

    This was the ONLY solution that worked for me!  Once I changed the source to the file I was actually working in I had to save the file then close it.  When I reopened it the edit links option was finally greyed out!  Thank you SOOOOO Much!  This was driving me batty.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2014-05-29T21:22:55+00:00

    Links can also be found in charts, and not just the source data but even the titles!  They can also be found on objects, e.g., a combobox whose ListFillRange property is a range in another workbook.

    Here's some code I wrote to find all links.  I hope you can copy-and-paste it OK!  It creates a tab-delmited text file in the active workbook's folder with a list of all the links from formulas, names, charts and objects.

    Const LinkRefPattern1$ = "*.xl??]*", LinkRefPattern2$ = "*.xl?]*"

    Public Sub AllLinks()

        Dim Rg As Range, Rg1 As Range, WS As Worksheet, Nm As Name, Ch As Chart, cs As ChartObject

        Dim Obj As Object, Sh As Shape, F%, FN$, Flag As Boolean, TestStr$

        Close

        F% = FreeFile(): FN$ = ActiveWorkbook.FullName & " Links.txt": Open FN$ For Output As #F%

        Print #F%, "Type"; vbTab; "Worksheet"; vbTab; "Source"; vbTab; "Target"

        If Application.Workbooks.Count > 2 Then     ' Including this workbook

            MsgBox "Please close all but the one workbook in which to find links.", vbExclamation

            Exit Sub

        End If

        For Each Nm In ActiveWorkbook.Names         ' Name links

        If Nm.RefersToLocal Like LinkRefPattern1$ Or Nm.RefersToLocal Like LinkRefPattern2$ Then

            Flag = True: Print #F%, "Name"; vbTab;

            If TypeName$(Nm.Parent) <> "Workbook" Then Print #F%, Nm.Parent.Name;

            Print #F%, vbTab; Nm.Name; vbTab; "'"; Nm.RefersToLocal

        End If

        Next

        For Each Ch In ActiveWorkbook.Charts        ' Links in chart sheets

            Flag = AllChartLinks(F%, Ch)

        Next

        For Each WS In ActiveWorkbook.Worksheets

                                                    ' Formula links

            Set Rg1 = WS.Cells.Find(LinkRefPattern1$, LookIn:=xlFormulas, LookAt:=xlWhole)

            If Not (Rg1 Is Nothing) Then

                Set Rg = Rg1

                Do

                    If Rg.HasFormula Then Print #F%, "Formula"; vbTab; WS.Name; vbTab; Rg.AddressLocal(False, False); vbTab; "'"; Rg.FormulaLocal

                    Set Rg = WS.Cells.FindNext(Rg)

                    If Rg Is Nothing Then Exit Do

                Loop Until Rg.Address = Rg1.Address

            End If

            Set Rg1 = WS.Cells.Find(LinkRefPattern2$, LookIn:=xlFormulas, LookAt:=xlWhole)

            If Not (Rg1 Is Nothing) Then

                Set Rg = Rg1

                Do

                    If Rg.HasFormula Then Print #F%, "Formula"; vbTab; WS.Name; vbTab; Rg.AddressLocal(False, False); vbTab; "'"; Rg.FormulaLocal

                    Set Rg = WS.Cells.FindNext(Rg)

                    If Rg Is Nothing Then Exit Do

                Loop Until Rg.Address = Rg1.Address

            End If

            For Each cs In WS.ChartObjects          ' Links in chart objects on worksheets

                Flag = AllChartLinks(F%, cs.Chart, WS)

            Next

            On Error Resume Next

            For Each Sh In WS.Shapes                ' Shape links

                TestStr$ = "": TestStr$ = Sh.ControlFormat.LinkedCell

                If TestStr$ Like LinkRefPattern1$ Or TestStr$ Like LinkRefPattern2$ _

                Then Flag = True: Print #F%, "Shape CF Link"; vbTab; WS.Name; vbTab; Sh.Name; vbTab; "'"; Sh.ControlFormat.LinkedCell

                TestStr$ = "": TestStr$ = Sh.ControlFormat.ListFillRange

                If TestStr$ Like LinkRefPattern1$ Or TestStr$ Like LinkRefPattern2$ _

                Then Flag = True: Print #F%, "Shape CF List"; vbTab; WS.Name; vbTab; Sh.Name; vbTab; "'"; Sh.ControlFormat.ListFillRange

                TestStr$ = "": TestStr$ = Sh.DrawingObject.LinkedCell

                If TestStr$ Like LinkRefPattern1$ Or TestStr$ Like LinkRefPattern2$ _

                Then Flag = True: Print #F%, "Shape DO Link"; vbTab; WS.Name; vbTab; Sh.Name; vbTab; "'"; Sh.DrawingObject.LinkedCell

                TestStr$ = "": TestStr$ = Sh.DrawingObject.ListFillRange

                If TestStr$ Like LinkRefPattern1$ Or TestStr$ Like LinkRefPattern2$ _

                Then Flag = True: Print #F%, "Shape DO List"; vbTab; WS.Name; vbTab; Sh.Name; vbTab; "'"; Sh.DrawingObject.ListFillRange

            Next

            For Each Obj In WS.OLEObjects           ' Object links

                TestStr$ = "": TestStr$ = Obj.LinkedCell

                If TestStr$ Like LinkRefPattern1$ Or TestStr$ Like LinkRefPattern2$ _

                Then Flag = True: Print #F%, "Object Link"; vbTab; WS.Name; vbTab; Obj.Name; vbTab; "'"; Obj.LinkedCell

                TestStr$ = "": TestStr$ = Obj.ListFillRange

                If TestStr$ Like LinkRefPattern1$ Or TestStr$ Like LinkRefPattern2$ _

                Then Flag = True: Print #F%, "Object List"; vbTab; WS.Name; vbTab; Obj.Name; vbTab; "'"; Obj.ListFillRange

            Next

            On Error GoTo 0

        Next

        If Not Flag Then Print #F%, "None"

        Close #F%

    End Sub

    Private Function AllChartLinks(F%, Ch As Chart, Optional WS As Worksheet = Nothing) As Boolean

        Dim cs As Series, Ax As Axis, DL As DataLabel, FL$, WSname$, Flag As Boolean

        If Not (WS Is Nothing) Then WSname$ = WS.Name

        For Each cs In Ch.SeriesCollection

            FL$ = ""

            On Error Resume Next

            FL$ = cs.FormulaLocal

            On Error GoTo 0

            If FL$ Like "=SERIES(*,*," & LinkRefPattern1$ & "!*,*)" Or FL$ Like "=SERIES(*,*," & LinkRefPattern2$ & "!*,*)" _

            Then Flag = True: Print #F%, "Chart Series"; vbTab; WSname$; vbTab; Ch.Name; "/"; cs.Name; vbTab; "'"; FL$

            If cs.HasDataLabels Then

            For Each DL In cs.DataLabels

                If DL.FormulaLocal Like LinkRefPattern1$ Or DL.FormulaLocal Like LinkRefPattern2$ _

                Then Flag = True: Print #F%, "Chart Series Label"; vbTab; WSname$; vbTab; Ch.Name; "/"; cs.Name; "/"; DL.Name; vbTab; "'"; DL.FormulaLocal

            Next

            End If

        Next

        If Ch.HasTitle _

        Then If Ch.ChartTitle.FormulaLocal Like LinkRefPattern1$ Or Ch.ChartTitle.FormulaLocal Like LinkRefPattern2$ _

        Then Flag = True: Print #F%, "Chart Title"; vbTab; WSname$; vbTab; Ch.Name; vbTab; "'"; Ch.ChartTitle.FormulaLocal

        For Each Ax In Ch.Axes

            If Ax.HasTitle _

            Then If Ax.AxisTitle.FormulaLocal Like LinkRefPattern1$ Or Ax.AxisTitle.FormulaLocal Like LinkRefPattern2$ _

            Then Flag = True: Print #F%, "Axis Title"; vbTab; WSname$; vbTab; Ch.Name; " / "; AxisGroup$(Ax.AxisGroup); vbTab; "'"; Ax.AxisTitle.FormulaLocal

        Next

        AllChartLinks = Flag

    End Function

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2012-12-04T14:58:28+00:00

    With apology for delay, I only just saw your request, Jan. The subject file has long disappeared off my mental radar screen. However, if I should encounter this particularly nasty bug again, I will try to set aside for you a sanitized copy of it for a bit of autopsy.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments