stuartnico
New Member
- Joined
- Jun 16, 2015
- Messages
- 10
Hello
Calling the VBA Jedi Masters....
I use excel 2007 - old but does the job.
Anyway this works to a degree it does seem to take sometime to run but I suspect this is more down to the poor power in my laptop.
It does seek out the URL in column A and Inserts the image into column B at the corresponding cell/row to the image URL.
The only bit that I'm struggling with is how to resize the images so that are scaled down to a thumbnail size.
I'm more into .php than VBA and as an old codger it takes a while for the penny to drop...lol
I cannot take credit for the above as I found it on the net not sure where tbh.
Calling the VBA Jedi Masters....
Code:
Sub GRABIMAGE()
Dim url_column As Range
Dim image_column As Range
Set url_column = Worksheets(1).UsedRange.Columns("A")
Set image_column = Worksheets(1).UsedRange.Columns("B")
Dim i As Long
For i = 1 To url_column.Cells.Count
With image_column.Worksheet.Pictures.Insert(url_column.Cells(i).Value)
.Left = image_column.Cells(i).Left
.Top = image_column.Cells(i).Top
image_column.Cells(i).EntireRow.RowHeight = 120
End With
Next
End Sub
I use excel 2007 - old but does the job.
Anyway this works to a degree it does seem to take sometime to run but I suspect this is more down to the poor power in my laptop.
It does seek out the URL in column A and Inserts the image into column B at the corresponding cell/row to the image URL.
The only bit that I'm struggling with is how to resize the images so that are scaled down to a thumbnail size.
I'm more into .php than VBA and as an old codger it takes a while for the penny to drop...lol
I cannot take credit for the above as I found it on the net not sure where tbh.
Last edited by a moderator: