Your code worked for me--after I fixed the typo
(.worksheetS(.worksheets.count)).
You may want to paste the actual portion of the code that failed.
And while you're testing links, make sure you have a copy of Bill Manville's
FindLink program:
http://www.oaltd.co.uk/MVP/Default.htm
You'll find it very useful.
steve wrote:
See the code below. I want to copy a sheet named "Report" to a new workbook.
Then I want to break all the links. I am gettin an error that says
"BreakLink of workbook failed" or something like that. any ideas?
Dim Nwb as Workbook
Set Nwb = Workbooks.Add
With Nwb
ThisWorkbook.Worksheets("Report").Copy after:=.Worksheet _
(.Worksheets.Count)
Dim LinkSource As String
LinkSource = ThisWorkbook.Path & ThisWorkbook.Name
.BreakLink Name:=LinkSource, Type:=xlLinkTypeExcelLinks
End With
--
Dave Peterson