LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Update Links on file open

Put your code in the Workbook_Open event found in the ThisWorkbook module.

--
Regards,
Tom Ogilvy

"Mick Southam" wrote in message
...
Dave

I have done as you suggested and it works the first time I use it, but not
if I open it again from within another macro.

Rather than use a normal file I am using a template as I need a blank file
open each time, it will open the template but does not run the Sub
Auto_Open() or at least I think that's what happens. Does this mean it

need
to be written differently for a template. I have tried using

Workbooks.Add
Template:= instead but when I do UpdateLinks will not work.

Regards

Mick

"Dave Peterson" wrote in message
...
You can toggle the setting (user by user, though) via:

Tools|Options|Edit Tab.
There's a checkmark for "ask to update automatic links"

But this means that you suppress the question--the links still get

updated.

This setting is for the individual user--and affects all their

workbooks.

If you want more control:
Try creating a dummy workbook whose only purpose is to open the original
workbook with links updated:

Kind of like:

Option Explicit
Sub auto_open()
Workbooks.Open Filename:="c:\my documents\excel\book2.xls",

UpdateLinks:=1
ThisWorkbook.Close savechanges:=False
End Sub

Then you open the dummy workbook and the links will be refreshed.

And xl2002 added an option that allows you to have more control:
Edit|links|startup prompt button.
check the "don't display the alert and update links"




Mick Southam wrote:

Hi
Can anyone help please, I need to automatically update links as a file

opens
without any user input.

--
Kind Regards

Mick


--

Dave Peterson







 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
** Links don't update UNLESS source file is open Jack Links and Linking in Excel 1 July 27th 05 02:02 PM
** Links don't update UNLESS source file is open Jack Links and Linking in Excel 0 July 14th 05 05:55 PM
update links without other worksheet open? Mary C Excel Discussion (Misc queries) 3 June 9th 05 08:00 PM
Can you update links between workbooks without them both open? Nicolle K. Excel Discussion (Misc queries) 1 January 7th 05 07:39 PM
Automate open file, update links, run macro, close and save file Geoff[_7_] Excel Programming 2 August 26th 03 10:13 PM


All times are GMT +1. The time now is 07:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"