'from http://www.ozgrid.com/forum/printthread.php?t=19700
Sub OpenCloseLinks()
Dim myLinks As Variant, i As Integer
myLinks = ActiveWorkbook.LinkSources(xlExcelLinks)
If Not IsEmpty(myLinks) Then
On Error Resume Next
For i = LBound(myLinks) To UBound(myLinks)...