ChristineMD
Board Regular
- Joined
- Jul 29, 2008
- Messages
- 53
Found this nifty piece of code out on the webs to display pictures from urls in excel. When I run it I get the following error: runtime error 1004, unable to get the insert property of the picture class
Further googling shows this as an issue in excel 2007 that was fixed in excel 2010 which is what I have. Any other ideas?
Example of url from column a:
vb code:
thanks in advance - this forum has always been so helpful!
Further googling shows this as an issue in excel 2007 that was fixed in excel 2010 which is what I have. Any other ideas?
Example of url from column a:
HTML:
<img src="http://cdn.yourzoom.com/up/01269.set/188w.jpg">
vb code:
Code:
Sub pix()
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 = .Height
End With
Next
End Sub
thanks in advance - this forum has always been so helpful!