VBA Opening WB's - how to eliminate all "...can't update links..." warnings

franklin_m

New Member
Joined
Jun 16, 2013
Messages
47
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I'm running a bit of code to open all the *.xlsx files in the same folder as the *.xlsm file. But I keep getting the window that says:
We can't update some of the links in your workbook right now.
You can continue without updating their values, or edit the links you think are wrong.

Here's the snippet of the code that's opening the files...

Code:
MyPath = ActiveWorkbook.Path & "\"
MyFiles = Dir(MyPath & "*.xlsx")
    
Do While MyFiles <> ""
       Workbooks.Open MyPath & MyFiles
       Application.AskToUpdateLinks = False

       ' Other code here

Loop

One thing that may or may not make a difference, is that in the 'Other code part, it calls routines. One adds a worksheet to the open *.xlsx file, and another puts some formulas in that new worksheet.

Thanks for the help.
 
Last edited:

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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