I load to a file an image that is stored on the web.
Then I import this image to excel, but actually, with the cose I am using I do not import the image but just the link to it.
This is the code
Kill "C:\tmp\img.jpg"
ret = URLDownloadToFile(0, "http://www.remes-bonds.com/fr/" & ISIN & ".JPG", "C:\tmp\img.jpg", 0, 0)
ActiveSheet.Pictures.Insert("C:\tmp\img.jpg").Select
If ret = 0 Then
With Selection
.OnAction = "AllargaStringi"
.Name = Mid(Str(ur), 2)
.Top = Range("I" & Mid(Str(ur), 2)).Top
.Left = Range("I" & Mid(Str(ur), 2)).Left
.Width = Range("I" & Mid(Str(ur), 2)).Width
.Height = Range("I" & Mid(Str(ur), 2)).Height
End With
End If
Since this code works in a loop, at the end of it the latest image loaded is the only one I can see.
Is there a way to store images in the Excel file?
Bookmarks