Sub 查詢每日數據()
Set myIE = CreateObject("InternetExplorer.Application")
With myIE
.Visible = true
.Navigate "http://xxxxxxxxxxxx/xxx.aspx" '查詢數據網址
Do While .ReadyState <> 4
DoEvents
Loop
.Navigate "javascript:__doPostBack('ct600$phCondition3$cldDate','6656')" '點選查詢日期'6656'代表數字23,也就是當月23號
Application.Wait Now + 2 / 86400 '等待2秒
.document.forms(0).all("ct600_btnConfirm").Click '點選查詢按鈕
End With
End Sub
---------------------------------------------------------------------------------------------------------