updatelinks function doesn't work correctly

rnl0085

Board Regular
Joined
Dec 3, 2010
Messages
69
while it was always working, at some day it didn't anymore. using the updatelinks function in a macro, with that other file open at the same or a different pc, the macro that only uses the Worksheetfunction Updatelinks with a correct reference to the file but still vba crashes/gives an error.

somewhere i read that it might be caused because the file is open, but it always did work correctly.
 
Last edited:

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
The error i get is:

Runtime error 1004
Method 'UpdateLink' of object '_Workbook' failed

the code is

Public Sub Data()

Activeworkbook.Updatelink name:="K:\folder\filename.xls" Type:=xlExcelLinks

End sub
 
Upvote 0
It is open, but sometimes it is open at another computer (and that also gives the error, and the file from which to update the links isn't in the same directory as the file that uses the macro). But if it's open on the same computer, that causes the error then for sure on that computer?
 
Upvote 0
how can i do that? cause i want only the links to that file to be updated and not all the links in the workbook
 
Upvote 0
then it shows the normal 'open file' window (at c:\my documents\)
when i then go to the correct destination it actually works...but that destination link is already correct in the edit links overview..
 
Upvote 0
Sorry, I don't understand what you mean by "'open file' window". Pressing Update Values shouldn't require that you open a file.
 
Upvote 0

Forum statistics

Threads
1,224,534
Messages
6,179,391
Members
452,909
Latest member
VickiS

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top