shahin
Active Member
I've written a script in vba to enter a webpage, click on "a" tags under class name "domino-viewentry" and finally quit the browser when all the links are done clicking. However, after clicking on the first link my scraper throws an error "permission denied". I suppose, after clicking on the first link, my scraper can't go back to it's earlier position to chase the next link. How can i fix this?
Here is the script:
Here is the script:
Code:
Sub Click_Tag()
Dim post As Object
With CreateObject("InternetExplorer.Application")
.Visible = True
.navigate "http://www.siicex-caaarem.org.mx/Bases/TIGIE2007.nsf/4caa80bd19d9258006256b050078593c/"
While .readyState < 4: DoEvents: Wend
For Each post In .document.getElementsByClassName("domino-viewentry")
With post.getElementsByTagName("a")
If .Length Then .Item(0).Click
Application.Wait Now + TimeValue("00:00:02")
End With
Next post
.Quit
End With
End Sub