Break Links But Leave Formula

toe222

Board Regular
Joined
Feb 5, 2004
Messages
143
Ok I need to know how using VB how to open 500 workbooks and break all links to another workbook but leave the rest of the formula. I know how to loop thru all files but not remove the link reference.

=+'[Book1]Sheet1'!A1
needs to be
=Sheet1'!A1

I tried the below but it did not work.
For Each scrFile In scrFolder.Files
strName = scrFile.Name
Workbooks.Open (scrFile)
Cells.Replace What:="[Book1]", Replacement:=""
Activeworkbook.Close (True)
Next scrFile

Any help someone could give would be greatly appreciated cause I do not want to manually do the find and replace method.
 

Some videos you may like

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Watch MrExcel Video

Forum statistics

Threads
1,123,141
Messages
5,599,969
Members
414,353
Latest member
ljhan

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