Try:
Code:ActiveWorkbook.UpdateLink Name:= "c:\Rpt\CORP\Rep_Link.xls", _ Type:= xlExcelLinks
You had a double \ in your path
ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources, Type:=xlExcelLinks
Dim link as Workbook, LinkSources
linkSources = ThisWorkbook.linkSources(xlExcelLinks)
If IsArray(linkSources) Then
For Each link In linkSources
If Instr(Link.Name,"Rep_Link") Then
ThisWorkbook.UpdateLink Link.Name, XlLinkType.xlLinkTypeExcelLinks
Exit For
End If
Next
End If
Have you triedCode:ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources, Type:=xlExcelLinks
it will update all linked workbooks.
If that works OK, then there is something wrong with the path you supply.
If it works, but you only want to update using one of the workbooks and not the others, then you can loop through each and do only the one:
Code:Dim link as Workbook, LinkSources linkSources = ThisWorkbook.linkSources(xlExcelLinks) If IsArray(linkSources) Then For Each link In linkSources If Instr(Link.Name,"Rep_Link") Then ThisWorkbook.UpdateLink Link.Name, XlLinkType.xlLinkTypeExcelLinks Exit For End If Next End If