Thread: BreakLink
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Steve Steve is offline
external usenet poster
 
Posts: 1,814
Default BreakLink

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