
Use a custom function to delete external links
in a workbook
Like the previous macro, this macro will delete all external links;
however, they will be deleted in the entire workbook, not just the
current worksheet. This macro will look up all existing worksheets
of a workbook and delete the external links while changing them to
values.
4
To delete all external links in a workbook:
1. Press <Alt+F11>.
2. On the Insert menu, click Module.
3. Type the following macro:
Sub DeleteExLinksWkb()
Dim rng As Range
Dim wks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
For Each rng In wks.UsedRange
If InStr(rng.Formula, "[") > 0 Then
rng.Value = rng.Value
End If ...