View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Extracting links from images

Sub Tester1()
Dim hLink As Hyperlink
Dim rng As Range
For Each hLink In ActiveSheet.Hyperlinks
If TypeName(hLink.Parent) = "Shape" Then
Set rng = hLink.Parent.TopLeftCell.Offset(0, 2)
rng.Value = hLink.Address
End If
Next
End Sub

You could also delete the hyperlink in the loop as well (an the shape as
well I assume)

Sub Tester1()
Dim hLink As Hyperlink
Dim rng As Range
For Each hLink In ActiveSheet.Hyperlinks
If TypeName(hLink.Parent) = "Shape" Then
Set rng = hLink.Parent.TopLeftCell.Offset(0, 2)
rng.Value = hLink.Address
hLink.Delete
End If
Next
End Sub

--
Regards,
Tom Ogilvy



"Fred Taylor" wrote in message
...
Tom,

I mean images. Images in a .gif format


"Tom Ogilvy" wrote in message
...
What do you mean by Icons? are they shapes.

--
Regards,
Tom Ogilvy

"Fred Taylor" wrote in message
...
Heloo All,

I have a page formatted this way:

Column A Column B Column C
Company Phone Web Site


The column C has icons with links to the web sites address.

How can I convert these links to text (such as www.example.com)

instead
of
having the links attached to the icons?

thanks in advance