Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-07-2014, 01:08 PM
Are Square Are Square is offline Break a Link Windows XP Break a Link Office 2003
Novice
Break a Link
 
Join Date: Jan 2010
Posts: 12
Are Square is on a distinguished road
Default Break a Link

I have a workbook that says (in the Edit Links dialog box) that it has a link to another workbook even though I can't find where that link is. As well, the workbook that is linked no longer exists. When I click "Break Link", nothing happens and the bogus link remains. How can I delete a link to a file that does not exist?



I am using Excel 2013 in Windows 8

Thanks,
RR
Reply With Quote
  #2  
Old 07-10-2014, 12:50 AM
macropod's Avatar
macropod macropod is offline Break a Link Windows 7 32bit Break a Link Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,369
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could run a macro like the following from the Excel VBA help file:
Code:
Sub UseBreakLink()
    Dim astrLinks As Variant
    ' Define variable as an Excel link type.
    astrLinks = ActiveWorkbook.LinkSources(Type:=xlLinkTypeExcelLinks)
    ' Break the first link in the active workbook.
    ActiveWorkbook.BreakLink _
        Name:=astrLinks(1), _
        Type:=xlLinkTypeExcelLinks
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 07-11-2014, 10:57 PM
Catalin.B Catalin.B is offline Break a Link Windows Vista Break a Link Office 2010 32bit
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

Check the defined names, you may have external references in names.
Catalin
L.E.:
Also, if you have shapes (buttons, etc) in your sheets, with macro's assigned to them, these links will remain, even if you break the links.
Use codes like these:
Code:
For Each Shp In ActiveSheet.Shapes 'remove assigned macro's
           Shp.RefersTo = ""
       Next
  
     
    Dim Nm As Name 'there are names linked to source workbook, delete them...
    For Each Nm In ActiveWorkbook.Names
        Nm.Delete
    Next
You can change the code to see if that shape or name has external links, and only then take action.

Last edited by Catalin.B; 07-12-2014 at 01:45 AM.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to link page numbers in the footer, but refuses to link after new section fl0shizzle Word 7 05-06-2014 12:15 PM
Break a Link Section Break (Next Page) replaces Section Break (Continuous) when deleted Carlabasson Word 2 03-25-2013 10:13 PM
How to link an object to a URL link to update automatically expert4knowledge Excel 1 06-11-2012 09:30 AM
why the "section break-next page" is switched to "section break-continuous"? Jamal NUMAN Word 6 12-14-2011 03:35 PM
paragaph hard break, soft break and ...strange break czomberzdaniela Word 2 12-03-2010 06:58 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:14 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft