The page loads fine, and the submit button at the bottom gets invoked fine (buttom.Click
), but how do I grab the two tables marked in screenshot (see arrows)?
Option Explicit
Private Sub CommandButton1_Click()
Dim buttom As MSHTML.HTMLInputElement
Dim table1 As MSHTML.HTMLInputElement
Dim i As SHDocVw.InternetExplorer
Set i = New InternetExplorer
i.Visible = True
i.navigate ("http://10.236.244.10/summary.php")
Do While i.readyState <> READYSTATE_COMPLETE
Loop
Dim idoc As MSHTML.HTMLDocument
Set idoc = i.document
idoc.getElementsByName("start_date").Item.Value = "2020/12/15 00:00:00"
idoc.getElementsByName("end_date").Item.Value = "2020/12/15 23:59:59"
Application.Wait Now() + TimeValue("00:00:01")
idoc.getElementsByTagName("select").Item.Value = "45"
Set buttom = idoc.getElementsByName("submit")(0)
buttom.Click
Do While i.readyState <> READYSTATE_COMPLETE
Loop
'''''' Probably some code needs to go here?????
End Sub