Share via

Remove FriendlyName from Hyperlink via Function or Macro?

Anonymous
2010-06-22T03:55:07+00:00

I know this is an odd request.

Does anyone know how to take "Click Here" type links and show the actual URL in the text instead of "Click Here." I must be able to do this to thousands of "Click Here" links at one time, manually changing it won't do at all. It appears I need a function or macro. Is this possible?

Help --- thanks!

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2010-06-24T01:05:07+00:00

Someone answered my questions on the Facebook fan page for Excel:

Sub ExtractHL()

Dim HL As Hyperlink

For Each HL In ActiveSheet.Hyperlinks

HL.Range.Offset(0, 1).Value = HL.Address

Next

End Sub

http://excel.tips.net/Pages/T003281\_Extracting\_URLs\_from\_Hyperlinks.html

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2010-06-23T20:14:40+00:00

    Your code makes sense to my meager understanding of VB coding. Thanks!

    Unfortunately, I'm getting an error:

    "Run-time error '7':

    Out of Memory"

    I thought perhaps there were too many URLs so I just posted one into a new workbook and it still has the same result with the single "Click Here" link.

    When I press debug it takes me to the "H.ScreenTip = ST" line of the macro... any ideas? (I have no clue why it'd be out of memory.)

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2010-06-22T06:42:41+00:00

    Sub ChangeHyperlinkTips()

      Dim H As Hyperlink

      Dim ST As String

      For Each H In ActiveSheet.Hyperlinks

        ST = H.Address

        If H.SubAddress<>"" Then ST = ST & "#" & H.SubAddress

        H.ScreenTip = ST

      Next

    End Sub


    Bill Manville. Excel MVP, Oxford, England. www.manville.org.uk

    Was this answer helpful?

    0 comments No comments