|
楼主 |
发表于 2018-11-12 11:14
|
显示全部楼层
本帖最后由 wl-w.l 于 2018-11-12 11:29 编辑
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False '关闭屏幕刷新
'On Error Resume Next
Dim temp
n = Range("F65536").End(xlUp).Row
With CreateObject("Microsoft.XMLHTTP")
.Open "GET", "http://abchina.yinhangkahao.com/", False '打开网页 "GET" 256KB "POST"4MB
For p = 2 To n
.document.getElementById("inputtext").Value = Cells(p, 6) '填入查询内容
.document.getElementById("inputbt").Click '查询
.send
temp = Split(Split(.responsetext, "<p style="), "<p>") '分列网页源码
Cells(p, 3) = Split(Split(temp(3), ">")(1), " -- ")
Cells(p, 4) = Split(Split(temp(3), " -- ")(1), "</font>")
Cells(p, 2) = Split(Split(temp(2), "</p>")(1), " --")
If Cells(p, 2) = "工商银行" Then
Cells(p, 5) = "0200"
Else
Cells(p, 5) = "0000"
End If
Next p
Set temp = Nothing
End With
Application.ScreenUpdating = True '打开屏幕刷新
MsgBox "完成"
End Sub |
|