C
Cresta
Hello all, I am having issue with code below throwing a
Run-time error '1004' Method 'UpdateLink' of object '_Workbook' failed
on this line:- ActiveWorkbook.UpdateLink Name:=cLink, Type:=xlExcelLinks
The correct link name is being displayed when I hover over 'cLink'
Can anyone see where I am going wrong?
With Application.Workbooks(MyExcelFile)
..Activate
aLinks = ActiveWorkbook.LinkSources(xlExcelLinks)
If Not IsEmpty(aLinks) Then
For i = 1 To UBound(aLinks)
cLink = Split(aLinks(i), "\")(UBound(Split(aLinks(i), "\")))
If UCase(cLink) = UCase(Linkname) Then
ActiveWorkbook.UpdateLink Name:=cLink, Type:=xlExcelLinks
End If
Next i
End If
End With
Thankyou for you assistance
Run-time error '1004' Method 'UpdateLink' of object '_Workbook' failed
on this line:- ActiveWorkbook.UpdateLink Name:=cLink, Type:=xlExcelLinks
The correct link name is being displayed when I hover over 'cLink'
Can anyone see where I am going wrong?
With Application.Workbooks(MyExcelFile)
..Activate
aLinks = ActiveWorkbook.LinkSources(xlExcelLinks)
If Not IsEmpty(aLinks) Then
For i = 1 To UBound(aLinks)
cLink = Split(aLinks(i), "\")(UBound(Split(aLinks(i), "\")))
If UCase(cLink) = UCase(Linkname) Then
ActiveWorkbook.UpdateLink Name:=cLink, Type:=xlExcelLinks
End If
Next i
End If
End With
Thankyou for you assistance