Home > Software engineering >  Click on the link by vba simulation
Click on the link by vba simulation

Time:11-12

Want to pass the vba click on the "batch download" http://www.dce.com.cn/dalianshangpin/xqsj/tjsj26/rtj/rcjccpm/index.html web page, is used to select a date, how do you write the code?

I write my own code, where is wrong?

Set the IE=CreateObject (" internetexplorer. Application ")
Strurl="http://www.dce.com.cn/dalianshangpin/xqsj/tjsj26/rtj/rcjccpm/index.html"
IE. Navigate strurl
IE. Visible=False
The Do While IE. READYSTATE & lt;> 4
DoEvents
Loop
The Set of aa=IE. Document. Getelementsbytagname (" a ")
For Each b In aa
If the Trim (b.i nnertext)="batch download" Then
Biggest lick
The Exit For
End the If
Next

CodePudding user response:

You have to get the date element, change its value, refresh the page, click download again,
  •  Tags:  
  • VBA
  • Related