Forum Discussion
How to find and remove active content links in excel
When I open my excel file (using Office 365) I get this security message:
SECURITY WARNING: Some active content has been disabled. Click for more details. [Enable Content]
When I click [Enable Content], excel proceeds to try and access files 1) linked files available on my network but have been moved and 2) MS 365 login dialog box opens and requests: Sign In. Tell us the account you want to use to open [Charts] - random name of file to illustrate my problem.
So my problem is #2 above: how do I find where [Charts] and remove the [Charts] link is because its not in Data > Edit Links, Data > Queries & Connections, Formulas > Name Manager, Control G > Object search, Control F search for [Charts] across the workbook; and its not an external link in a chart, pivot table, or macro. With regards to the File > Options > Trust Centre > Active X Settings, I can change the Active X settings to "disable all control without notification" but that does not solve my problem of finding and removing the [Charts} link. Also the Data > Edit Links > Startup Prompt does not apply because [Charts] does not appear as a link. My file has some minor macros but I have gone through every line of the code and it does not have links or references to [Charts].
I have followed most of the steps on this page. I stopped at Dynamic Arrays
https://www.ablebits.com/office-addins-blog/2021/01/27/find-break-external-links-excel/
This all started because I was copying data or importing tabs from other excel spreadsheets into my spreadsheet. So I am now trying to clean up my file to get rid of these hidden Active Content links
So back to my original question: how do I find and remove Active Content links given all of the steps I have take above?
EDIT: I have existing links in the file that must remain intact. The links identified in Data > Edit Links are all valid.
5 Replies
- Juliano-PetrukioBronze Contributor
Sub BreakLinks() Dim wb As Workbook Set wb = Application.ActiveWorkbook If Not IsEmpty(wb.LinkSources(xlExcelLinks)) Then For Each link In wb.LinkSources(xlExcelLinks) wb.BreakLink link, xlLinkTypeExcelLinks Next link End If End Sub
- Hello380Copper Contributor
Thank you for your reply but that unfortunately is overkill as it breaks all links. I need to selectively find the Active Control [Charts] link, review that its not critical, then break it if I deem it to be useless. I have whole bunch of other links [Data > Edit Links] in the file that are valid and must remain intact.
- Riny_van_EekelenPlatinum Contributor
Hello380 Try the tool in the below link: