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
Bookmarks