Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good eyes, Ron.
Ron de Bruin wrote: I think it is this Dave the / LinkSource = ThisWorkbook.Path & "/" & ThisWorkbook.Name -- Regards Ron de Bruin http://www.rondebruin.nl "Dave Peterson" wrote in message ... I could get the error if there were no links or if the worksheet were protected. If you do it manually, does that provide any hint? steve wrote: the "s" was lost when i copied it over. here is the exact error I keep getting: Method 'BreakLink' of Object '_Workbook' failed thanks for the link, but I still can't figure out why i'm getting an error here. "Dave Peterson" wrote: 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 -- Dave Peterson -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why these commands make erros? (Breaklink and SaveAs) | Excel Programming |