This code will open new IE window and automatically search a home address in the website tool bar and fetch the needed value of property value and rent from the search result. I am getting this error meanwhile:
Option Explicit
Sub getrent()
Dim ele As Object
'Dim i As Long
Dim IE As Object
Dim FindHomes As Object
Set IE = CreateObject("InternetExplorer.Application")
'For i = 3 To 101
IE.Visible = True
IE.Navigate "http://www.zillow.com/"
Do While IE.Busy Or _
IE.readystate <> 4
DoEvents
Loop
Set FindHomes = IE.document.getelementsbyname("citystatezip")
FindHomes.Item(0).Value = "497 North Main Street, PITTSTON, PA"
IE.document.getElementById("GOButton").Click
Do While IE.Busy Or _
IE.readystate <> 4
DoEvents
Loop
'Set ele = IE.document.all
Set ele = IE.document.getelementsbyname("Zestimate")
Workbooks("Book1").Sheets("Sheet1").Cells(6, 6) = ele.Value '----> Error in this line'
'Next
End Sub
Plus I have one more doubt, as you can see the search result, it has many elements by the name Zestimate, how to I find the particular Zestimate element which is in the bubble over google maps?
Bookmarks