Archive of Mr Excel Message Board

Back to Hyperlinks in Excel archive index
Back to archive home

Removing multiple hyperlinks
Posted by Greg on August 22, 2001 9:16 AM
Does anyone know if it's possible to remove hyperlinks for multiple cells in a column or row. I tried many different options and while I was able to remove the underline and different text color I was unable to remove the hyperlink itself? If you know a solution to this, please e-mail me. Thanks.
Greg

Re: Removing multiple hyperlinks
Posted by Russell Hauf on August 22, 2001 9:52 AM
Here's a very crude program that I use that will do it. You can easily modify it to do what you want.
HTH,
Russell
'************************************************
Sub GetRidOfLinks()
'
' GetRidOfLinks Macro
' 08/03/2001 - Russell Hauf
'
Dim intCol As Integer
Dim intRow As Integer
Dim intLastRow As Integer
intRow = 1
intCol = InputBox("Enter the column number with the links")
intLastRow = InputBox("What row number should we go down to?")
On Error Resume Next
For intRow = 1 To intLastRow
Cells(intRow, intCol).Select
Selection.Hyperlinks(1).Delete
Next intRow
End Sub
'************************************************

This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our
online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.