UpdateLink Problem

C

Cresta

Hello All
File1.xlsb is open and has all the code in it.
The code opens File2.xlsb, without issues, and when I try to update a single
link in File2.xlsb the following error error message occurs:
RTError 1004 "Method UpdateLink of object _Workbook failed"
Then the message
"Cannot run the macro 'File2_MyRibbonInitialise'. The macro may not be
available..."

I used the following code for the update:

Application.Calculation = xlCalculationAutomatic '(Just in case it needs to
be on)
Application.Workbooks("File2.xlsb").UpdateLink _
Name:="\\mappeddrive\..\..\..\..\..\linkedfile.xlsb", _
Type:=xlExcelLinks
Application.Calculation = xlCalculationManual

The macro 'File2_MyRibbonInitialise' will have already run as File2 opened
(for the ribbon callbacks). The UpdateLink is trying to run it again and
giving the above errors.

Any ideas to prevent this happening.
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top