Question regarding Find and Replace

derekc1231

New Member
Joined
May 31, 2022
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hello everyone, I am new to VBA and learning a ton using these forums but I am stumped on how I should tackle this problem I am coming across.

The Problem:

I am setting up VBA for our workplace physical inventory that we do 1 time per quarter. I have so far got my code to create a new folder based on today's date, and then the code will copy and paste all the files and subfolders from the master folder into this newly created folder. The issue I am having is that the excel file we use for our physical inventory, is linked to various other excel workbooks, so when I attempt copy and paste the files, the file paths change and break the links to the various workbooks. Ideally, I am just trying to get my code to find and replace the existing "master template" folder path, to the newly created folder path as mentioned above. That way, all that needs to be done is to click the button that creates the new physical inventory folder with the master templates, then it will find and replace all existing external paths, with the new folder path to enable the links to continue working. If one of you master excel wizards would be so kind to help a rookie out, I would greatly appreciate it. I am not at work now, but I can provide the VBA code I have created thus far.

Thank you once again for all your help.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,215,679
Messages
6,126,186
Members
449,296
Latest member
tinneytwin

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