![]() |
Remove hyperlinks
I have downloaded a lot of text from a site and most of it is in hyperlinks, but I just
want the text. Is there a quick way to remove all the hyperlinks in a worksheet or workbook. I appreciate I could loop round all the cells but there is a lot of material and I just wondered if there was something simpler. I would value any help. Regards Graham |
Remove hyperlinks
Hi Graham,
Try: ActiveSheet.Hyperlinks.Delete --- Regards. Norman "Graham H" wrote in message ... I have downloaded a lot of text from a site and most of it is in hyperlinks, but I just want the text. Is there a quick way to remove all the hyperlinks in a worksheet or workbook. I appreciate I could loop round all the cells but there is a lot of material and I just wondered if there was something simpler. I would value any help. Regards Graham |
Remove hyperlinks
Sub RemoveHyperLinks()
Dim hlinks As Hyperlinks Dim hlink As Hyperlink Set hlinks = Sheet1.Hyperlinks For Each hlink In hlinks hlink.Delete Next hlink End Sub There you go :D grab the hyperlinks collection from Sheet1 (change if on another sheet) and then go through each hyperlink in the collection, deleting as you go. Hope this helps! :) "Graham H" wrote: I have downloaded a lot of text from a site and most of it is in hyperlinks, but I just want the text. Is there a quick way to remove all the hyperlinks in a worksheet or workbook. I appreciate I could loop round all the cells but there is a lot of material and I just wondered if there was something simpler. I would value any help. Regards Graham |
Remove hyperlinks
Oops, Norman's way is much better - Only one line and poof! They're all gone.
"NateBuckley" wrote: Sub RemoveHyperLinks() Dim hlinks As Hyperlinks Dim hlink As Hyperlink Set hlinks = Sheet1.Hyperlinks For Each hlink In hlinks hlink.Delete Next hlink End Sub There you go :D grab the hyperlinks collection from Sheet1 (change if on another sheet) and then go through each hyperlink in the collection, deleting as you go. Hope this helps! :) "Graham H" wrote: I have downloaded a lot of text from a site and most of it is in hyperlinks, but I just want the text. Is there a quick way to remove all the hyperlinks in a worksheet or workbook. I appreciate I could loop round all the cells but there is a lot of material and I just wondered if there was something simpler. I would value any help. Regards Graham |
Remove hyperlinks
Thanks for that Norman, I think Nates description of "one line and poof!" sums it up.
Many thanks to both of you. Graham Norman Jones wrote: Hi Graham, Try: ActiveSheet.Hyperlinks.Delete --- Regards. Norman "Graham H" wrote in message ... I have downloaded a lot of text from a site and most of it is in hyperlinks, but I just want the text. Is there a quick way to remove all the hyperlinks in a worksheet or workbook. I appreciate I could loop round all the cells but there is a lot of material and I just wondered if there was something simpler. I would value any help. Regards Graham |
All times are GMT +1. The time now is 07:56 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com