我正在尋找一個代碼來將數值從一個Excel到一個網頁。VBA來完成一個Internet表格
Sub FillInternetForm()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.navigate "http://xxxxxxxx/"
IE.Visible = True
While IE.Busy
DoEvents
Wend
IE.document.getElementById("xxxxx").Value = "xxxx"
End Sub
的錯誤出現在IE.document.getElementById( 「XXXXX」)。值=「XXXX線和它說對象的方法 '文件''IWebBrowser 2失敗。
我尋找suggstions來解決這個問題:我做了很多的研究,並沒有什麼作品:/
提前:)
我可以建議一種不同的方法。你有沒有看到這篇文章http://stackoverflow.com/questions/158633/how-can-i-send-an-http-post-request-to-a-server-from-excel-using-vba – Miguel
嘗試'同時ie.Busy或ie.READYSTATE <> 4' – Jeeped
@謝謝你的幫助。不幸的是它沒有工作:( –