Copy Worksheet Save & break links

pignchick

New Member
Joined
Sep 24, 2014
Messages
10
I am looking for some vba code that will allow me to break all the links in a worksheet and then save the file in the same folder/file path but add Excel to the end of the file path.

For example; If I have an excel worksheet named test.xlsm with 20 tabs, I want to save a copy of that entire worksheet in the same folder as test.xlsm, but rename the worksheet as test excel.xls, and break the links in all 20 tabs.

The purpose of this exercise is to archive data, in case the links get messed up.

Any ideas?
 
Last edited:
<f8>

Worked great. Just one issue is that when I run the macro the first time I get

run-time error '1004':

Method 'BreakLink' of object'_Workbook' failed

If I run the macro a second time the error goes away.

Any idea what would cause that?</f8>
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,213,538
Messages
6,114,218
Members
448,554
Latest member
Gleisner2

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