I have written a VBA macro to count the (approximate) number of images returned for a Google search of a specific term. By approximate I mean that the program should count the n
Just do this instead, I am sure you can find a nicer way to do it (if you think it's worth the time) but this should be fine :
newNum = -1
Set objIE = New InternetExplorer
objIE.navigate fullUrl
Do While objIE.Busy = True Or objIE.readyState <> 4: DoEvents: Loop
Set currPage = objIE.document
Do Until oldNum = newNum
oldNum = newNum
newNum = currPage.getElementById("rg_s").getElementsByClassName("rg_di rg_bx rg_el ivg-i").Length
Application.Wait Now + TimeSerial(0, 0, 2)
currPage.parentWindow.scrollBy 0, 100000
Application.Wait Now + TimeSerial(0, 0, 2)
If newNum > 400 Then newNum = 400
Loop
Then you just have to adapt the delay in TimeSerial depending on how fast your computer loads ( in here I set in to 2 seconds)