removing and disabling hyperlinks in excel cells??

cfdh_edmundo

Board Regular
Joined
Nov 9, 2005
Messages
133
Hi,

Quick question, I've a sheet with codes that automatically generate hyperlinks in certain cells.

Is there anyway to globally remove and then disable the hyperlinks ?

I realise I can format the cell to take away the blue colouration of the text and the underline, but when I hover the mouse over the cell it is still a hyperlink.

Is there anyway to disable these links.

Any help would be great,

Cheers.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

cfdh_edmundo

Board Regular
Joined
Nov 9, 2005
Messages
133
Does using the Clear Contents option in the cell solve the problem?

Hi,

The thing is the text of the hyperlink contains data I want, so its just the linkage I want to remove.

So for instance the cell will display a team's name (like Spurs) and then will link to their website if clicked on (ie goes to www.spurs.co.uk).

I want it to still say "Spurs", but I want the linkage removed.
 

maytas

New Member
Joined
Sep 5, 2006
Messages
18
Hi,

Code:
Sub DisableHyperlinks()
    Dim Link As Hyperlink
    If ActiveSheet.Hyperlinks.Count > 0 Then
        For Each Link In ActiveSheet.Hyperlinks
            Link.Delete
        Next Link
    End If
End Sub
 

Forum statistics

Threads
1,136,369
Messages
5,675,362
Members
419,565
Latest member
Phil57

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top