remove hyperlinks

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
 
F

Frank Kabel

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
 
D

Dave Peterson

MSIE 6.0.xxxx doesn't do this?

(I understand that I may not be up to snuff with NS 4.78 <vbg>.)
 
D

Dave Peterson

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.)
 
D

Dave Peterson

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
 
F

Father Guido

Thanks Dave,

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

Thanks again!

Norm
 
Top