Article ID: 182297
Article Last Modified on 6/17/2005
'This Sub procedure deletes all hyperlinks in the active worksheet.
Sub DeleteAllHyperlinks()
For Each xLink In ActiveSheet.Hyperlinks
xLink.Delete
Next xLink
End Sub
'This Sub procedure displays a series of message boxes indicating
'the location of each hyperlink in the active worksheet.
Sub ReportHyperlinkLocations()
For Each xLink In ActiveSheet.Hyperlinks
MsgBox xLink.Range.Address
Next xLink
End Sub
'This Sub procedure identifies each hyperlink and asks if you want
'to delete it. If you click Yes, the hyperlink is deleted.
Sub ReportAndDeleteHyperlinks()
For Each xLink In ActiveSheet.Hyperlinks
Response = MsgBox("Delete hyperlink in cell " & _
xLink.Range.Address & " ?", vbYesNo)
If Response = vbYes Then xLink.Delete
Next xLink
End Sub
'This Sub procedure selects all cells in the worksheet that contain
'hyperlinks. You can then clear the selected cells to delete all of
'the hyperlinks.
Sub SelectAllHyperlinkCells()
FirstCell = 1
For Each xLink In ActiveSheet.Hyperlinks
If FirstCell = 1 Then
Set xRange = xLink.Range
FirstCell = 0
Else
Set xRange = Application.Union(xRange, xLink.Range)
End If
Next xLink
xRange.Select
End Sub
hyperlinks, creating
Additional query words: link URL "select.special" specialcells routine subroutine XL98
Keywords: kbprb kbdtacode KB182297