+ Reply to Thread
Results 1 to 2 of 2

button to update external file links?

  1. #1
    Forum Contributor
    Join Date
    02-09-2004
    Posts
    154

    button to update external file links?

    I want to put a button on my sheet which will update all external links.

    The links are files EX1 to EX10 and will not change. All i need is the code which updates these links via vba.

    thanks
    Last edited by neowok; 02-28-2005 at 12:03 PM.

  2. #2
    Forum Contributor
    Join Date
    02-09-2004
    Posts
    154
    trying to work out the code to update all workbook links via vba

    tried this from the help file

    ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources

    and i get an error saying "method 'updatelink' of object '_workbook' failed"

    my code is

    Application.DisplayAlerts = False
    ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources
    Application.DisplayAlerts = True

    some of the links will not be valid as the files do not exist so i have turned alerts off to stop the errors. with alerts on, it asks for the location of all the missing files one at a time and then at the end it comes up with the same error as above.

    any ideas how i can solve this? I do not want any prompting of any kind, just click the button and links that can be updated are updated, and the others are left.
    Last edited by neowok; 02-28-2005 at 12:37 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1