remove hyperlinks

  • Thread starter Thread starter mangesh
  • Start date Start date
M

mangesh

hi
i have cloumn A in that i have hyperlinks i want to delete all tha
hyperlinks is there any commna for tha
 
Hi
the following macro removes all hyperlinks of your selected cells (code
from David McRitchie):


Sub MakeTextOnlyFromHyperlinks()
'David McRitchie, 2000-08-23 worksheet.functions !!
Dim cell As Range
Dim URL As String
For Each cell In Selection
If IsEmpty(cell) Then GoTo chknext
URL = ""
On Error Resume Next
URL = cell.Hyperlinks(1).Address
If Err.Number = 9 Then GoTo chknext
If Trim(URL) = "" Then GoTo chknext
cell.Value = URL
cell.Hyperlinks(1).Delete
chknext: On Error GoTo 0
Next cell
End Sub
 
MSIE 6.0.xxxx doesn't do this?

(I understand that I may not be up to snuff with NS 4.78 <vbg>.)
 
Depends on what your definition of normal is. <vbg>.

(It sounds like J.E. doesn't see it when he uses his windows emulator on his
Mac.)
 
If you want to leave the cell's value unchanged, then delete (or comment) this
line:

cell.Value = URL

You can comment it with a leading apostrophe:

'cell.Value = URL
 
Thanks Dave,

Guess I should have read the script instead of just copying it and running it.

Thanks again!

Norm
 

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