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: Oldest
  1. Anonymous
    2014-01-20T05:45:40+00:00

    I knew about all the others...but conditional formatting .....slipped right though...thansk for the resolve

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2014-04-16T10:53:04+00:00
    1. We tried breaking the links manually - luck
    2. We ran this VBA code to force the break - usually works but didn't this time

    Sub BreakLinks()

    'Updateby20140318

    Dim wb As Workbook

    Set wb = Application.ActiveWorkbook

    If Not IsEmpty(wb.LinkSources(xlExcelLinks)) Then

    For Each link In wb.LinkSources(xlExcelLinks)

    wb.BreakLink link, xlLinkTypeExcelLinks

    Next link

    End If

    End Sub

    1. Then checked in the Name Manager - empty for the columns/rows that were populated
    2. Then checked Conditional Formatting - empty again
    3. Then checked for Data Validation - also empty

    Repeated steps 3-5 and on step 5 got the warning "The selection contains more than one type of validation.". I clicked OK to erase current settings, repeated step 1 (links still in the Edit Links window); saved the workbook and closed it; opened it again and the links had disappeared!!

    Was this answer helpful?

    8 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2014-05-13T05:40:04+00:00

    In my case the problem arose when I copied in 2 protected sheets.  I later found that they were also referencing a hidden sheet and when I unhid the extra sheet and then moved all 3 sheets to my workbook the problem was no longer present as the 2 protected sheets were still able to reference the previously hidden sheet now copied into the workbook.

    Was this answer helpful?

    0 comments No comments
  4. 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