Break Links using a macro problem
Hiya,
I have a nice long macro in which some sheets are copied to another workbook
& the links are broken.
Originally, the sheets were copied to 'Bookx' a completely new workbook, but
due to needing an auto_open macro for the output files, I've had to create a
template for them to be copied to -that's the only difference & now the break
links bit doesn't work.
Code extract Befo
Sheets(Array("Instruct&Methodology", "Resource", "Area", "ADO", "LDG1",
"LDG2", "LDG3", "LDG4", "LDG5", _
"LDG6", "LDG7", "LDG8", "LDG9")).Copy
For Each wkb In Application.Workbooks
If Left(wkb.Name, 4) = "Book" Then
wkb.Activate
GoTo ExitLoop
End If
Next wkb
ExitLoop:
ActiveWorkbook.BreakLink Name:=ThisWorkbook.FullName,
Type:=xlLinkTypeExcelLinks
Code Extract After:
Sheets(Array("Instruct&Methodology", "Resource", "Area", "ADO", "LDG1",
"LDG2", "LDG3", "LDG4", "LDG5", _
"LDG6", "LDG7", "LDG8", "LDG9")).Copy
Befo=Workbooks("Template.xls").Sheets(1)
Workbooks("Template.xls").BreakLink Name:=ThisWorkbook.FullName,
Type:=xlExcelLinks
I've tried a few variations on this final line, but none have worked.
Any suggestions?
Thanks
merry_fay
|