Breaking Links

michaeldh

Board Regular
Joined
Jun 11, 2002
Messages
201
Hi Guy's,

I have a spreadsheet which runs a macro to move and copy all of the worksheet tabs into a new book. Once the information has moved I want to break all links in the workbook.

I have been using the following commands which were recorded in a macro:

ActiveWorkbook.BreakLink Name:="H:\Doc Program\DOC PROGRAM.xls", Type:= _
xlExcelLinks
ActiveWorkbook.BreakLink Name:="H:\Doc Program\Lions Den GP Calculator.xls", _
Type:=xlExcelLinks
ActiveWorkbook.BreakLink Name:="H:\Doc Program\New Car Delivery Book.xls", _
Type:=xlExcelLinks
ActiveWorkbook.BreakLink Name:="H:\Doc Program\New Car Order Book.xls", Type _
:=xlExcelLinks
ActiveWorkbook.BreakLink Name:="H:\Doc Program\Stock Level Movements.xls", _
Type:=xlExcelLinks
ActiveWorkbook.BreakLink Name:="H:\Doc Program\Used Car Delivery Book.xls", _
Type:=xlExcelLinks
ActiveWorkbook.BreakLink Name:="H:\Doc Program\Wholesale Buy Book.xls", Type _
:=xlExcelLinks
ActiveWorkbook.BreakLink Name:="H:\Admin\Smcash\CMBK CURRENT MONTH.xls", _
Type:=xlExcelLinks
ActiveWorkbook.BreakLink Name:="H:\Doc Program\Phone & Floor Log Stats.xls", _
Type:=xlExcelLinks

Unfortunately it doesn't seem to work and says RunTime Error 1004
Method 'Breaklink'of Object'_Workbook'Failed

If you could offer some suggestions to combat this problem, I would be most appreciative...even if there is a quick method of breaking all links.

Thanks.

Michael. :)
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Guy's,

I worked out what I was doing wrong...I need to make the new workbook save first as it needs a path.

Thanks.
 
Upvote 0

Forum statistics

Threads
1,221,706
Messages
6,161,406
Members
451,702
Latest member
Kc3475

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