kerrypnx
11/2/2018 - 9:13 AM

IE Search

revise 11-2

Sub IEsearch()

Dim KW, Su
With CreateObject("InternetExplorer.Application")
.Navigate "http://www.google.com/"
.Visible = True
Do Until .readyState = 4
DoEvents
Loop
'Set KW = .document.getElementsByName("wd")
'KW.Item(0).Value = "QQ"
.Document.getElementsByName("wd").Item(0).value = "QQ" '等同上面2句
'Set Su = .document.getElementByid("f")
'Su.Submit
.Document.getElementByid("f").Submit '等同上面2句
End With
Set Su = Nothing
Set KW = Nothing
End Sub