Excel has link (I want to remove it).

H

Howard Brazee

When I open an Excel workgroup I wrote, I now have a new Informational Window:

The workbook you opened contains automatic links to information in another
workbook. Do you want to update this workbook with changes made to the other
workbook?

o To update all linked information, click Yes.
o To keep the existing information, click No.



How do I trace down these links and remove them? They do not belong.
 
S

SA

Howard:

Here's a little VBA function that you can cut and paste into a Visual Basic
module in your workbook. Run it from the immediate window by typing
?FindBookExtRefs(), and it will locate all of them for you.....

HTH

Steve Arbaugh
MS Access MVP

==========begin code==================

Function FindBookExtRefs()
Dim objRange As Range
Dim i As Integer
Dim j As Long

For Each Worksheet In ActiveWorkbook.Worksheets
Worksheet.Activate
Set objRange = ActiveSheet.UsedRange
For i = 1 To objRange.Columns.Count
For j = 1 To objRange.Rows.Count
objRange(j, i).Select
If InStr(objRange(j, i).Formula, "[") > 0 Then 'there's an
external reference
If MsgBox("There's an external reference to: " & objRange(j,
i).Formula & " in cell: " & _
ActiveSheet.Name & " " & ActiveCell.Address & "; do you
want to delete it?", vbYesNo) = vbYes Then _
objRange(j, i).Formula = Null
End If
Next j
Next i
Next
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top