This code opens an IE tab and puts the cell value from the sheet to the search bar and then click the go button Can someone please rectify the error it is coming in highlighted line:
Option Explicit
Sub getrent()
Dim ele As Object
Dim i As Long
Dim IE As Object
Dim FindHomes As Object
' Create InternetExplorer Object
Set IE = CreateObject("InternetExplorer.Application")
For i = 3 To 101
' You can uncoment Next line To see form results
IE.Visible = False
' Send the form data To URL As POST binary request
IE.Navigate "http://www.zillow.com/"
' Wait while IE loading...
Do While IE.Busy Or _
IE.readystate <> 4
DoEvents
Loop
Set FindHomes = IE.document.getelementsbyname("Find Homes:")
FindHomes.Item(0).Value = Workbooks("Book1").Sheets("Sheet1").Cell(i,5)--------> will this Cell reference work and the runtime error is also in this line, I think it's because of FindHomes
IE.document.getElementById("GOButton").Click
Next
End Sub
Bookmarks