VBA help - Code to update excel links when file path changes

jirose93

New Member
Joined
Nov 12, 2019
Messages
1
Hi all,

I am really struggling to find an answer to my question so hoping someone here might be able to help.

I have a set of Excel documents set up as a template for new jobs each time a new job comes in. When we get a new one in I copy and paste the "template" file and rename it as the new file name.

The file is set up with subfolders, each containing an Excel workbook and they all link to each other (about 50 separate workbooks within the template file) - obviously these links work fine within the original template file but as soon as I copy and paste then none of the links update to the new file path and instead still link back to the original template file.

Can someone tell me if it's possible to have a macro that will automatically update all 50+ Excel workbooks when I copy and paste the template file to reflect the new file path, rather than me having to go into each separate workbook when I copy it over and restore the links manually?

Thank you in advance!!
 

Some videos you may like

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
47,926
Office Version
  1. 365
Platform
  1. Windows
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules. Be sure to follow & read the link at the end of the rule too!

Cross posted at: VBA help - Code to update excel links when file path changes

If you do cross-post in the future and also provide a link, then there shouldn’t be a problem.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,452
Messages
5,601,748
Members
414,471
Latest member
cchunyadi

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
Top