Deleting Hyperlinks

Pauljj

Well-known Member
Joined
Mar 28, 2004
Messages
2,047
I have come across many posts but none that simply do the following

I have for some erroneous reason, hundreds of random hyperlinks all over a sheet. I need to remove the links whilst keeping everything else in the cell in place, ie format, value etc etc

Any ideas please ?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
I use:

Code:
Sub ZapHyperlinks()
    Cells.Hyperlinks.Delete
End Sub

But I'm not sure that's what your after.
 
Upvote 0
Hi

If you want to delete all the hyperlinks in a worksheet then;

Code:
    Sub RemoveHyperlinks()
        ActiveSheet.Hyperlinks.Delete
    End Sub
Should do it :)
 
Upvote 0
Thank you for your replies, I tried both methods and got the following error message, then excel crashed

Run time error '-2147417848(80010108)':
Method Delete' of object' hyperlinks failed
 
Upvote 0
How odd :(

In your original post you suggested that your hyperlinks were erroneous and you needed to keep formatting?

Do you have an example of that data? How do you get that data into Excel?

Something in that might be a problem.

(I might not be able to get back to you today but the bump / info might do you some good)
 
Upvote 0
This is part of the text. The hyperlinks appeared in error, no one seems to know how they got there and now we just can't seem to get rid of them without doing each cell manually

2c GPD roster.xls
ABCDEFGHIJ
15JoanneAXP1111X
16SamSnX11111X
17SarahMX11111X
18MariaDX11111X
19MattRX11111X
20<><><><><><><><>
21CarmenH
22AlanWX11111X
23<><><><><><><><><>
24<><><><><><><><><>
25PTGrainne4XX111XX
26PTAlda1X111XXX
27
28
29
Jul-Dec
 
Upvote 0
So the "<>" are the cells with the hyperlinks?

Where do they link to?

Have you tried recording a macro when your deleting them and amending it to do the whole workshet? (If not then try recording it and posting back what you get)
 
Upvote 0
Im amazed at how difficult this seems to be, recorded the macro to remove 1 link, it took the formatting away. So copied the formatting elsewhere, so I could copy it back then had this macro


Selection.Hyperlinks(1).Delete


Tried to then select the whole area and run the macro, literally nothing happened then tried again then I go

Run time error 9, subscript out of range ??????

So puzzled
 
Upvote 0
I get the same error message as earlier which is

Run time error '-2147417848(80010108)':
Method Delete' of object' hyperlinks failed
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,147
Members
452,891
Latest member
JUSTOUTOFMYREACH

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
Back
Top