Update external link

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I would like to have an auto update of all external links each time i open
my excel document.

What is the exact VBA code to use?

thank you,

Serge
 
From Excel VBA help:
This example updates all links in the active
workbook.ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSourcesI've not
used it, but it sounds like it does what you need.Ian"serge"
 
hi,

I added
Private Sub Workbook_Open()
ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources
End Sub

but i still have the message at the opening of the workbook. "do u want to
update the links?"

How can i avoid this message?

thank you,
Serge
 
Sorry Serge. I don't know how to stop the prompt from appearing (or even if
it's possible).

You may get an answer if you post in microsoft.public.excel.programming

Ian
 
Serge,

I don't know how to specify the Excel worksheet to update external
links automatically each time you open it. However, I resolved this
problem with a workaround. I had many Excel files, and created a new
workbook that I named "main.xls". This workbook is otherwise empty,
but I added into it Private Sub Workbook_Open() macro that opens all
the other workbooks in a way that all the external links are updated.
Workbook open lines had this format:

Workbooks.Open ("C:\Folder\FileName1.xls"), UpdateLinks = 3
Workbooks.Open ("C:\Folder\FileName2.xls"), UpdateLinks = 3
etc.

After this, all I do is open the "main.xls" and all the files open
nicely without any questions.

Janne

serge kirjoitti:
 
Back
Top