Jul 22 2020 05:47 AM
Jul 22 2020 05:47 AM
We use Excel for preparing budget files. These files then get collated in MS Power BI for group wide analysis.
One issue we have is that users can sometimes paste links from spreadsheets on their desktops into the budget files. This naturally causes problems when other users open them.
Is there any way to prevent external links from being inserted? I've searched in Data Validation and Protect Sheet but haven't found anything suitable.
Jul 22 2020 06:53 AM
Jul 22 2020 07:14 AM
@Nikolino , the issue isn't hyperlinks as such, its cells pointing at external workbooks. So cells with values like the below
='[Desktop Budget File]Project Budget'!$I$23
=C://users/userA/desktop/'[Desktop Budget File]Project Budget'!$I$23
Jul 22 2020 07:44 AM
Mar 30 2021 08:45 AM
I am having this same issue. We use a standard template that users download and complete. The file has embedded logic, data validations and defined pivots. Many users are are saving / copying the data into the template that results in data corruptions, link issues and content enablement warning. The handling of the file seems to pickup every storage location along the way. This is degrading the effectiveness of this tool.
This issue is not Hyper Links but the embedded references to name ranges that get corrupted.
How can this be prevented?
Mar 30 2021 10:00 AM
Got another way to stop hyperlinks, found on the internet.
If you want to break all of the external links, both the ok and error links, the following VBA code can help you to break them all.
1. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.
2. Click Insert > Module, and paste the following code in the Module Window.
Sub BreakLinks() 'Updateby20140318 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
Then press F5 key to run the code, and all of the external links in the whole workbook have been broken.
Hope I was able to help you with this info.
I know I don't know anything (Socrates)