ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Links and Linking in Excel (https://www.excelbanter.com/links-linking-excel/)
-   -   Hyperlinks to Files, Make Them Go Away (https://www.excelbanter.com/links-linking-excel/24575-hyperlinks-files-make-them-go-away.html)

Joe Reggae

Hyperlinks to Files, Make Them Go Away
 
Hello,

I'm using Excel 2002 and have a spreadsheet in which nearly every cell has
somehow come to contain an unwanted hyperlink to an external file. I can
remove these links one cell at a time (right-click, Remove Hyperlink),
however there are too many cells affected to do this manually. I have tried
using a macro ...

Sub RemoveHyperlinks()
Selection.Hyperlinks.Delete
End Sub

but this has no effect. The link text (shown in a tooltip) is ...
file:///C:\Desktop Guidelines\3.00 Piping Inspection Programs\3.08 Below
Grade Piping Inspection Guidelines\3.08.11 Excavated Pipe Inspection
Guideline.doc

Can anyone suggest a way to get rid of these links? Thanks in advance.




Joe Reggae

I solved this problem. Somehow the hyperlinks were in every cell of rows 1
to 243 and then from row 65,000 to the end. Once I deleted the bottom-most
rows the vba script was able to delete the remaining hyperlinks.



David McRitchie

Hi Joe,
You realize that the macro works on a selection of cells.
http://www.mvps.org/dmcritchie/excel/buildtoc.htm

I can't duplicate what you say you are getting. There is
one foible with generating a bunch of hyperlinks with the
fill handle. Several of them are the same hyperlink or
act like it so if you destroy some of them with the macro
-- you actually destroy more than a selection of only some
of them. But that sounds rather opposite of the problem
you are experiencing.

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Joe Reggae" wrote in message ...
Hello,

I'm using Excel 2002 and have a spreadsheet in which nearly every cell has
somehow come to contain an unwanted hyperlink to an external file. I can
remove these links one cell at a time (right-click, Remove Hyperlink),
however there are too many cells affected to do this manually. I have tried
using a macro ...

Sub RemoveHyperlinks()
Selection.Hyperlinks.Delete
End Sub

but this has no effect. The link text (shown in a tooltip) is ...
file:///C:\Desktop Guidelines\3.00 Piping Inspection Programs\3.08 Below
Grade Piping Inspection Guidelines\3.08.11 Excavated Pipe Inspection
Guideline.doc

Can anyone suggest a way to get rid of these links? Thanks in advance.






David McRitchie

Hi Joe,
Sorry missed your own reply. Were those other links
actually all for the same link address. Not that I have
an answer but it looks like it could be what I was indicating.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Joe Reggae" wrote in message ...
I solved this problem. Somehow the hyperlinks were in every cell of rows 1
to 243 and then from row 65,000 to the end. Once I deleted the bottom-most
rows the vba script was able to delete the remaining hyperlinks.






All times are GMT +1. The time now is 08:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com