Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Update Links automatically using VBA ?

On Fri, 1 Aug 2003 10:05:52 +0100, Michael Beckinsale wrote:

I have a Excel spreadsheet that needs to be linked to several Excel files
which are
always identical in layout but will be renamed and moved to different
folders.

I have written the macro which re-defines the filepath etc but my problem
is that once the links have been re-defined the links will not update unless
l take the following steps manually:

1) Edit
2) Links
3) UpdateNow

to make matters worst 3) has to be repeated for each link in the list.

Can somebody pls tell me or provide VBA code that will automatically
update ALL the links ?

All help greatly appreciated.


Regards

Michael Beckinsale


Code:

Sub test()

Dim MyLink as Variant

For Each MyLink In ActiveWorkbook.LinkSources(xlExcelLinks)
ActiveWorkbook.UpdateLink Name:=MyLink, Type:=xlExcelLinks
Next MyLink

End Sub


This should do what you are looking for... perhaps a little tweakin' is
required.

SL
Reply
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
Automatically Update Excel Links Rodman Excel Discussion (Misc queries) 0 March 11th 10 07:30 PM
Update Files Automatically with Links Chris Excel Discussion (Misc queries) 1 November 4th 09 06:25 PM
automatically update links to add-ins BigJimmer Links and Linking in Excel 3 August 27th 09 05:40 PM
UPDATE LINKS AUTOMATICALLY Navya Excel Discussion (Misc queries) 0 June 24th 09 04:14 PM
Links update automatically Lp12 Excel Discussion (Misc queries) 0 July 14th 05 11:30 AM


All times are GMT +1. The time now is 09:39 PM.

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"