Copy Worksheets to new workbook but break link formula.

BrianO

New Member
Joined
Mar 13, 2009
Messages
47
Hi all,

I'm looking to copy worksheets from one workbook to another. but there are formulas on the worksheets. I'm using

ActiveWorkbook.Worksheets("Book1").Copy After:=Workbooks("Book2.xls").Sheets(1)

to copy the sheets. Basically I am looking for book2 to be completely independant of book1. I dont want book2 to have any links to book1 but I would still like all the formulas to work book2.

Any ideas.

Thanks

BrianO
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
After copying the worksheet, choose Edit|Links and Change Source to Book2.xls by browsing. The macro recorder will give you some sample code. If you are copying multiple sheets copying them all at once will preserve the links between them.
 
Upvote 0
Thanks Andrew

Is it possible to use something like
ActiveWorkbook.WorkSheets("sheet1").Copy After:=Workbooks("Book2.xls").Sheets(1)

to select multiple sheets (I also have charts in the original workbook.)

*EDIT*****

ok figured it out

Sheets(Array("sheet1", "sheet2", "Pivots", "sheet3" _
)).Copy Before:=Workbooks("Book3").Sheets(1)


Thanks

B
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,728
Members
452,939
Latest member
WCrawford

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