Avatar of RAJESH JOSHI
RAJESH JOSHI

asked on 

Excel VBA form fill IE

I am trying the following code.
Sub redfin_test()
'Application.ScreenUpdating = False

Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True


IE.Navigate "https://www.redfin.com"
Do While IE.Busy = True Or IE.ReadyState <> 4: DoEvents: Loop
Do While IE.Busy = True Or IE.ReadyState <> 4: DoEvents: Loop
Application.Wait (Now + TimeValue("00:00:1"))

IE.Document.getElementsByClassName("search-input-box")(0).Value = "5606 Trout Creek Pass Dr,CO,80917"
Application.Wait (Now + TimeValue("00:00:4"))
IE.Document.Forms(0).Submit
 Do While IE.Busy = True Or IE.ReadyState <> 4: DoEvents: Loop
 Do While IE.Busy = True Or IE.ReadyState <> 4: DoEvents: Loop
 Application.Wait (Now + TimeValue("00:00:4"))
 'IE.Quit
 'Set IE = Nothing


'Application.ScreenUpdating = True
End Sub

Open in new window


It does not show search result.
Manually I enter same value, it returns the result.
Where is my mistake?
VBAMicrosoft OfficeMicrosoft Excel

Avatar of undefined
Last Comment
Subodh Tiwari (Neeraj)

8/22/2022 - Mon