Extracting linked hyperlink name from a picture - Help!

RedRocksTim

New Member
Joined
Jun 9, 2006
Messages
19
Hi,
I need help extracting the linked hyperlink from a picture. I have a worksheet that has a bunch of images in it. Each image has a hyperlink associated with it and next to each picture is a cell with a text string (e.g. "Fred's website") that is hyperlinked to a website (e.g. Blogspot.fred.com). When I hover the mouse over the picture, the hyperlink shows as "Fred's website" and NOT blogspot.fred.com. If I click the picture it will open my default browser and take me to blogspot.fred.com though. So, it looks to me that the hyperlink attched to the picture is linked to the cell with the hyperlink in it. Does this make sense? I can extract the names of the pictures which are named by default ( e.g. Picture 5, picture 9, etc). I can also extract the hyperlink assicated with the picture but it comes back with blogspot.fred.com and not "Fred's website." What I'm wanting to do is copy the cell and picture onto another sheet as the original sheet has a bunch of garbage on it (including other images without hyperlinks) that I don't want. So, I need a way to reference the correct picture with the correct hyperlinked cell. There are several hundred pictures and hyperlinked cells. I guess I could compare the extracted hyperlink addresses but, it seems there should be an easier way.
Thanks in advance for any help!
 

Some videos you may like

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

pbornemeier

Well-known Member
Joined
May 24, 2005
Messages
3,884
If you edit the hyperlink on a picture does the descriptive text appear when the ScreenTip button is pushed? If so this code could get you started:

Code:
Sub ExtractHyperlinkInfo()

    Dim lX As Long
    
    For lX = 1 To ActiveSheet.Shapes.Count
        With ActiveSheet.Shapes(lX)
            .Select
            Debug.Print .Name & vbTab,
            Debug.Print Selection.ShapeRange.Item(1).Hyperlink.Address & vbTab,
            Debug.Print Selection.ShapeRange.Item(1).Hyperlink.ScreenTip
        End With
    Next

End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,122,806
Messages
5,598,188
Members
414,218
Latest member
speedbit

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top