0
我想爲Google Chrome代替IE使用下面的代碼。 公用Sub GetValueFromBrowser() 昏暗即作爲對象 昏暗URL作爲字符串 昏暗myPoints作爲字符串爲Google Chrome創建對象
url = "http://localhost:8080/xyz"
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = 0
.navigate url
While .Busy Or .readyState <> 4
DoEvents
Wend
End With
Dim Doc As HTMLDocument
Set Doc = ie.document
myPoints = Trim(Doc.getElementsByName("points")(0).Value)
Range("A1").Value = myPoints
結束子
http://stackoverflow.com/問題/ 5915325 /開放谷歌 - 鉻 - 從-VBA的Excel中 –