View Single Post
  #3  
Old November 12th, 2008, 07:44 AM posted to microsoft.public.excel.links
Bill Manville
external usenet poster
 
Posts: 258
Default Weird Links Behavior

The options you have chosen for updating links in A and in B could be
relevant here. Those options are affected by:
a) Tools Options Edit Ask to update automatic links
b) Edit Links Startup Prompt (for each workbook)
c) Whether you choose to update or not when asked
d) If opening by program, the setting of the UpdateLinks argument
e) The version of Excel (2007 has an additional 2 relevant options)
f) Tools Options Calculation Save external link values (for each
workbook)

If you can advise us on all the above we may be able to reproduce the
issue and help you further.

I am aware that:
- if you open A without updating links it will still have data from C
from the last time A was saved after updating the links
- if you then open B in the same instance of Excel without updating
links it will also still have data from C from the last time B was
saved after updating the links.
- Excel then notices that there are two sets of data from C (which may
differ) and decides in its wisdom that one is correct - and I can't
recall whether it chooses A or B but I think it is A, resulting in
changes in the linked data in the other workbook even though C has not
been opened.

To ensure the data from C is up to date you should always refresh the
links on opening.

I am also aware that there are occasional instances when refreshing
links without opening the source file (C) does not work, although the
circumstances in which this happens are not clear. In such cases you
need to open the source file to get the links updated. You could do
this automatically by using an Auto_Open macro in each of the workbooks
A and B that refer to C:

Sub Auto_Open()
Application.OnTime Now, "Continue_Open" ' allow open to complete
End Sub

Sub Continue_Open()
Application.ScreenUpdating = False
Workbooks.Open ThisWorkbook.Path & "\C.xls", ReadOnly:=True
' this will update the link values
Workbooks("C.xls").Close False
Application.Calculate ' ensure all formulas are up to date.
Application.ScreenUpdating = True
End Sub

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup