|
楼主 |
发表于 2019-2-1 23:08
|
显示全部楼层
为了增加可靠性,再次修改!
Sub easy1()
'On Error Resume Next
Set ie = CreateObject("InternetExplorer.application")
With ie
.navigate "F:/根据地址查询经纬度-百度.htm"
.Visible = True
Do Until .ReadyState = 4
Loop
mr = [a65536].End(3).Row
For m = 2 To [a65536].End(3).Row
DoEvents
Cells(m, 2) = "": Cells(m, 3) = ""
.Document.getelementbyid("text_").Value = Cells(m, 1)
.Document.getelementbyid("text11").Click
If m = 2 Then Application.Wait (Now + TimeValue("00:00:01"))
Application.Wait (Now + TimeValue("00:00:01"))
V = Split(.Document.getelementbyid("result_").Value, ",")
Cells(m, 2) = V(0): Cells(m, 3) = V(1)
Next
End With
ie.Quit
End Sub
|
评分
-
5
查看全部评分
-
|