Results 1 to 1 of 1

Macro to Update a Specific Link

Threaded View

  1. #1
    Registered User
    Join Date
    05-29-2007
    Posts
    5

    Macro to Update a Specific Link

    I need some help creating a macro that will open a file that has links to current file and several other files, and updating only this file's link. The file being opened has multiple links, and even though I'm using the code below to save this book it is not updating all links to this file. This file has an MS qry refreshing to the file being opened. Your help would be greatly appreciated. This is my code. - Change to above. It is updating the links, but taking a long time. Would prefer to update links to open file only. Having both file open, is not updating the links

    Sub Send()
    '
        ActiveWorkbook.Save
    
        Application.DisplayAlerts = False
        Workbooks.Open Filename:= _
            "S:\Projects\F06 Focal Point\Archive\Old\SPT OPS Link.xls", _
            UpdateLinks:=3, ReadOnly:=False, Notify:=False
            
        If Workbooks("SPT OPS Link.xls").ReadOnly Then
            MsgBox "Database being updated by another user" & vbLf & "Please wait a couple of minutes & try again", _
                vbExclamation
            Workbooks("SPT OPS Link.xls").Close SaveChanges:=False
            Cancel = True
        Else
            Workbooks("SPT OPS Link.xls").Close SaveChanges:=True
            Application.DefaultWebOptions.UpdateLinksOnSave = True
        End If    
         Application.DisplayAlerts = True   
    End Sub
    Last edited by ln_excel; 06-07-2007 at 02:02 AM.

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