We help IT Professionals succeed at work.
Get Started

Excel VBA form fill IE

114 Views
Last Modified: 2020-01-04
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?
Comment
Watch Question
Excel & VBA Expert
CERTIFIED EXPERT
Most Valuable Expert 2018
Awarded 2015
Commented:
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE