我想通过输入特定日期并提交数据来使用 excel vba 提取表格形式网站.我想要那个日期的表



'我已经试过了,这个剂量不包含提取表的代码。我需要使用 vba 宏做这 4 件事。

1.enter the website 
2.enter the date 
3.Search the price form the website 
4.Return the table to the excel worksheet form the website 
Sub ClickButton()
Dim ie As Object
Dim form As Variant, button As Variant
Dim MyHTML_Element As IHTMLElement

Set ie = CreateObject("InternetExplorer.Application")
dateinput = InputBox("Enter date of for searching table eg. 2015-01-19")
With ie
.Visible = True
.navigate ("http://www.sharesansar.com/today.php#")
While ie.ReadyState <> 4
DoEvents
Wend
ie.document.getElementsbyname("date").Item.innertext = dateinput
Set form = ie.document.getElementsByTagName("form")
Set Buttoon = form(0).onsubmit
form(0).submit
End With
Set ie = Nothing
End Sub

拼写错误:

Set Button = form(0).onsubmit

应该是一个按钮。

最新更新