Help fetching images from all hyperlinks in a column

reflectingg0d

New Member
Joined
Mar 16, 2011
Messages
3
Hello,

I need some help with a macro I'm working on. There are a few things I need it to do:

1) Retrieve the images from all hyperlinks in F1:F5000
2) Display each image in the same row column D at 50% scale
3) If an image is not available at the specified URL, or a URL is not present in column F, leave column D blank

Here is what I have been able to find so far. It pulls the image and puts it in column D, but only for one row.

Sub Macro4()
'
' Macro4 Macro
'
'
Dim URL As String
Dim sh As Object
URL = Worksheets("NOT IN BOOK").range("F2").Value
range("D2").Select

' ActiveSheet.Pictures.Insert(URL).Select

ActiveSheet.Select
range("D2").Select
sImageToLoad = URL
Set sh = ActiveSheet.Pictures.Insert(sImageToLoad)
sh.Select
Debug.Print TypeName(sh), TypeName(Selection)
Selection.ShapeRange.ScaleWidth 0.5, _
msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 0.5, _
msoFalse, msoScaleFromTopLeft

End Sub

To further complicate things, I am running 2010 at home but need it to run in 2003 for work.

Here is the link to the spreadsheet if it helps.
http://www.megaupload.com/?d=0JOFEA59

Thanks guys. I've learned a lot from this site so far, hopefully someone will be able to point me in the right direction.

Paul
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,224,609
Messages
6,179,879
Members
452,948
Latest member
Dupuhini

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
Back
Top