• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

need help to find word in websit and paste comment in excel

jagu143

New Member
hi,

i want to find a word in website using vba.
below is my code but its not working in last
Sub com411()
Dim tx As Object
Set ie = CreateObject("internetexplorer.application")
ie.navigate "http://www.411.com/person"
ie.Visible = True
Application.Wait (Now + TimeValue("00:00:01"))
ie.document.all.tags("input")("basic_firstname").Value = "12"
Application.Wait (Now + TimeValue("00:00:01"))
ie.document.all.tags("input")("basic_name").Value = "12"
Application.Wait (Now + TimeValue("00:00:01"))
ie.document.all.tags("input")("basic_location").Value = "12"
Application.Wait (Now + TimeValue("00:00:01"))
ie.document.all.tags("input")("findperson_basic_submit").Click
Application.Wait (Now + TimeValue("00:00:01"))
Application.Wait Now() + TimeValue("00:00:03")

' ie.document.body.innerHTML = "Sorry, we could not find a match"
' ie.getElementById("dfp_ad_45").getElementsByClassName("search_results_header").getElementsByClassName("search_msg").Value


For Each tx In ie.document.all.tags("class")
If tx.outertext = "Sorry, we could not find a match." Then
Sheet2.Range("E28").Value = "Address Not Found"

Exit For
End If
Next
end sub
 
Back
Top