External link update macro
Consider the following "semi-automatic" approach:
Sub OpenAndClose()
Dim wBook(1 To 3) As Workbook
Set wBook(1) = Workbooks.Open("C:\test\alpha.xls")
Set wBook(2) = Workbooks.Open("C:\test\beta.xls")
Set wBook(3) = Workbooks.Open("C:\test\gamma.xls")
ThisWorkbook.Save
MsgBox (" ")
For i = 1 To 3
wBook(i).Close
Next
End Sub
This means maintaining a list of workbook files that are referenced.
But at least the open/close is automatic.
--
Gary''s Student - gsnu200908
"Ashley" wrote:
I am trying to write a macro that will open all sources of external links to
my document, save the document & then close all sources again.
I have been able to do this but as soon as i add a new link the macro does
not pick it up.
Note: simply updating links does not work as each sheet has many items
calculated off the current date & so each day they are opened they change.
Any ideas? or do i need to do it manually?
|