Remove HTML links in excel

  • Thread starter Thread starter Carlton Patterson
  • Start date Start date
C

Carlton Patterson

Hello all,

Can someone let me know if its possible to remove a whole bunch of html
links in excel. I have opened a html page with excel which naturally has
a number of links in it. I can remove links individually by simply right
clicking on a link and then click on 'remove hyperlink' however it
appears impossible to remove more than one hyperlink in a range of cells
at the same time.

Any help will be greatly appreciated.

Cheers

Carlton
 
Hyperlinks on a worksheet are stored in the Hyperlink Collection. The
following removes all hyperlinks in a worksheet

Dim lnk As Long
With Worksheets("Sheet1")
For lnk = 1 To .Hyperlinks.Count
.Hyperlinks.Delete
Next
End With
 
Hi Nigel,


Thanks for responding.

Excuse my ignorance, but can you tell me where I need to place the code
you just sent?

Cheers mate.

Carlton
 
Hi Nigel,


Thanks for responding.

Excuse my ignorance, but can you tell me where I need to place the code
you just sent?

Cheers mate.

Carlton
 
Hi,

I keep on the getting the message that the following is invalid outside
procedure:

With Worksheets("Sheet1")

Any help would be appreciated.

Cheers

Carlton
 
Not tested the code, but it goes in a sub

Sub RemoveHTML()
Dim lnk As Long
With Worksheets("Sheet1")
For lnk = 1 To .Hyperlinks.Count
.Hyperlinks.Delete
Next
End With
End Sub
 
Bob,

That worked fine.

Is there any chance you could help me out with the other request I
posted on this group? It that post I asked whether if someone could show
me how to program excel to remove blank rows in an spreadsheet.

Thanks again.

Carltoln
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top