LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default BreakLink

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why these commands make erros? (Breaklink and SaveAs) pauloreiss[_4_] Excel Programming 1 January 5th 06 03:53 AM


All times are GMT +1. The time now is 12:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"