I'm trying to paste image (thumbnail) linked to a link as below:
Ex. The main WEB page is: link
From this main page, I want to copy and paste as a bitmap in Excel the image of the link: www.imdb.com/name/nm0001271/?ref_=tt_cl_i1.
See the VBA code I tried, but it does not work:
Sub obter_imagem()
Dim v As Variant
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.Navigate "http://www.imdb.com/title/tt0071007/?ref_=nv_sr_7"
esperar = Now + TimeValue("0:00:30")
Do Until (.Busy = False And .ReadyState = 4) Or esperar < Now: DoEvents: Loop
x = 0
Do Until x >= 500
Set foto = ie.Document.getelementsbytagname("A")(x)
If foto Like "*cl_i1" Then
foto.Select
.Selection.Copy
Sheets("FIGURAS").Select
Range("A1").Select
ActiveSheet.Paste
ActiveSheet.PasteSpecial Format:="Bitmap", link:=False, _ DisplayAsIcon:=False
Exit Do
End If
x = x + 1
Loop
End With
End Sub