Here is the macro which :
Search a keyword from selected cell
copy first resualt of searching URL
paste it in the same cell where WAS the keyword.
What do I want it to do:
Search in "google Images" a keyword from one, specific Cell (Address already given)
open firstresualt of searching in max Size of the image
copy the URL
Paste into cell Range("F2")
Here is the code
Sub DZIALAJCEZIEALBOJUZCHROME()
Dim ie As Object
Dim I As Long
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True 'Just for our test
.navigate "https://www.google.com/search?site=imghp&tbm=isch&source=hp&biw=1920&bih=858&q=" & Worksheets("Arkusz3").Range("A2").Text & Worksheets("Arkusz3").Range("Z2").Text
Do While .ReadyState <> 4: DoEvents: Loop
Do While .Busy: DoEvents: Loop
With .Document
For I = 0 To .Links.Length - 1
If InStrB(1, .Links(I).InnerText, "A80147200") Then
ie.navigate .Links(I).href
Do While ie.ReadyState <> 4: DoEvents: Loop
Do While ie.Busy: DoEvents: Loop
MsgBox .URL
Exit For
End If
Next I
End With
End With
Set ie = Nothing
End Sub
Bookmarks