Forum Discussion
alanmccarthy
Jul 22, 2020Copper Contributor
How to stop users adding links to other workbooks
Hi, 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 the...
NikolinoDE
Jul 22, 2020Gold Contributor
Stop Automatic Hyperlinks in Excel
How to stop automatic hyperlinks in Excel?
To turn the hyperlink option off in Excel
On the Tools menu, choose AutoCorrect Options
Select the AutoFormat as you type tab
Remove the check mark from Internet and network paths with hyperlinks
Click OK
Remove a Hyperlink Manually
If you want to leave the hyperlink feature on, you can undo the hyperlink immediately after it's created.
To manually remove the hyperlink:
Type the email address and press Enter
Immediately, press Ctrl+Z.
This is a shortcut for Undo, and will convert the hyperlink back to text.
Remove Selected Hyperlinks Programmatically
To change a group of cells that contain hyperlinks, you can use the following code. It deletes all the hyperlinks in the selected cells.
Sub delHyperlinks()
Dim myCell As Range
For Each myCell In Selection
myCell.Hyperlinks.Delete
Next myCell
End Sub
I would be happy to find out if I could help.
Nikolino
I know I don't know anything (Socrates)
How to stop automatic hyperlinks in Excel?
To turn the hyperlink option off in Excel
On the Tools menu, choose AutoCorrect Options
Select the AutoFormat as you type tab
Remove the check mark from Internet and network paths with hyperlinks
Click OK
Remove a Hyperlink Manually
If you want to leave the hyperlink feature on, you can undo the hyperlink immediately after it's created.
To manually remove the hyperlink:
Type the email address and press Enter
Immediately, press Ctrl+Z.
This is a shortcut for Undo, and will convert the hyperlink back to text.
Remove Selected Hyperlinks Programmatically
To change a group of cells that contain hyperlinks, you can use the following code. It deletes all the hyperlinks in the selected cells.
Sub delHyperlinks()
Dim myCell As Range
For Each myCell In Selection
myCell.Hyperlinks.Delete
Next myCell
End Sub
I would be happy to find out if I could help.
Nikolino
I know I don't know anything (Socrates)
- alanmccarthyJul 22, 2020Copper Contributor
NikolinoDE , 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
or
=C://users/userA/desktop/'[Desktop Budget File]Project Budget'!$I$23
- NikolinoDEJul 22, 2020Gold Contributorim not sure but if you make a modul,
insert this code.
Option Explicit
Sub DeleteHyperlinks()
Worksheets("Text").Hyperlinks.Delete
End Sub
Please see this link too, maybe helps:
https://support.microsoft.com/en-gb/office/break-a-link-to-an-external-reference-in-excel-f1ca8b08-4f24-4af6-92e5-f4fdb1442748?ui=en-us&rs=en-gb&ad=gb