I would like to have the possibility to autofill the box on the website and validating it (Click OK) straight from the VBA code. I've inspected the website and the situation looks pretty much like this:
The following code:
Sub WBPoor()
Dim IE As Object
Dim classElement As Object
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = True
.navigate "https://www.openpoor.com" 'CHANGE URL
While .Busy Or .readyState <> 4: DoEvents: Wend
End With
Set classElement = IE.document.getElementsByClassName("searchbox")(0).getElementsByTagName("input") 'CHANGE CLASS NAME
If Not classElement Is Nothing Then
ActiveSheet.Range("A1").Value = "yes"
SendKeys "CB1 3QQ", True
Else
ActiveSheet.Range("A1").Value = "no"
End If
End Sub
returns the Yes value but nothing happens to the website.
How could be possible to type postcode and validate it?