0
我发现了许多类似的问题,但解决方案都是特定于正在处理的页面。我试图从下拉列表中选择一个值,然后触发事件处理程序来重置页面。我不是最擅长使用HTML,我无法确定如何在为下拉菜单指定值后获取页面更新。这是我有:使用VBA在IE中触发事件处理程序
Dim IE As Object
Dim IECollection As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.navigate "https://www.theocc.com/webapps/historical-volume-query"
Do While IE.busy
Application.Wait DateAdd("s", 1, Now)
Loop
Set IECollection =IE.Document.getElementsByName("historicalVolumeSearch.reportType")
i = 0
While i < IECollection.Length
If IECollection(i).Name = "historicalVolumeSearch.reportType" Then
IECollection(i).Value = "PC"
End If
i = i + 1
Wend
我不知道要从页面源代码下一步调用,以使其更新。
谢谢。
会更容易使用网页中列出的选项:https://www.theocc.com/market-data/batch-processing.jsp –
@TimWilliams不幸的是我需要的数据是不容易提取从批处理报告。还有其他建议吗? – amdopt