Update links in multiple workbooks simultaneously

  • Thread starter Thread starter dano
  • Start date Start date
D

dano

I have about 80 different workbooks all linked to the same data in one source
file, and a second "summary" workbook that's supposed to summarize the
results of the 80 workbooks. I'd like to change the data in the source file,
then open the "summary" file and have all the changes pushed through and
updated in each of the 80 workbooks. But, how can I do that without having to
open each one, choose "update links," and save the changes, 80 times over &
over? Any suggestions will be much appreciated.
 
A very simple macr will do the trick. If all the files are in the same
directory than change Folder as required.

Sub UpdateBooks()

Folder = "C:\Temp\"
FName = Dir(Folder & "*.xls")
Do While FName <> ""
If ucase(FName) <> "SUMMARY.XLS" Then
Set Bk = Workbooks.Open(Filename:=Folder & FName)
Bk.Close Savechanges:=True
End If
FName = Dir()
Loop
End Sub
 
Back
Top