View Single Post
  #17   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default how do I remove many hyperlinks from a spreadsheet at one time

You could use a macro:

Option Explicit
Sub testme()

Dim myShape As Shape

On Error Resume Next
For Each myShape In ActiveSheet.Shapes
myShape.Hyperlink.Delete
Next myShape
On Error GoTo 0

End Sub


judigentry wrote:

Dear Dave,
Thank you so much for your response. You saved me hours of time! I had 903
lines, and I wasted so many hours until I found your post....thank you, thank
you, thank you for taking your time to help people with this problem! It
worked beautifully. I also have another question. Along with my hyperlinks, I
have a graphic in the upper left hand corner of each. If I click on those the
hyperlink is still active. Can you tell me how to delete those too (without
having to delete them one by one)? Thank you again.

"Dave Peterson" wrote:

Select all the cells (ctrl-A (twice in xl2003))
hit alt-f11 (to get to the VBE, where macros live)
hit ctrl-g (to see the immediate window)

type this and hit enter:

selection.hyperlinks.delete

Close the VBE and back to excel to see if it worked.

===
You could even just select a smaller range and just clean that since the command
uses the current selection.

davey wrote:

--

Dave Peterson


--

Dave Peterson