ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Updating multiple layers of links (https://www.excelbanter.com/excel-programming/331177-updating-multiple-layers-links.html)

Klaus

Updating multiple layers of links
 
I have a reports workbook that is linked to a summary workbook which in turn
collects information from 15 other individual workbooks.
When I open up the reports workbook, it updates itself from the summary
workbook but the summary workbook does not update itself at the same time (is
this correct?). Is there a way I can force a total update programmatically so
that the reports contain current information.

Robin Hammond[_2_]

Updating multiple layers of links
 
Klaus,

This is untested, but you could try something like this:

'this goes in the reports workbook
Sub Auto_Open()
Dim strSummary As String
Dim wSummary As Workbook

'set the path to your summary file here
strSummary = "C:\Temp\Summary.xls"

Application.ScreenUpdating = False
'open the summary file and update any links in it
Set wSummary = Workbooks.Open(Filename:=strSummary, UpdateLinks:=3)
'calculate so that any links to the summary file in reports are updated
Application.Calculate
wSummary.Save
wSummary.Close False
Application.ScreenUpdating = True

End Sub

Robin Hammond
www.enhanceddatasystems.com

"Klaus" wrote in message
...
I have a reports workbook that is linked to a summary workbook which in
turn
collects information from 15 other individual workbooks.
When I open up the reports workbook, it updates itself from the summary
workbook but the summary workbook does not update itself at the same time
(is
this correct?). Is there a way I can force a total update programmatically
so
that the reports contain current information.





All times are GMT +1. The time now is 02:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com