- 帖子
- 127
- 主題
- 28
- 精華
- 0
- 積分
- 160
- 點名
- 0
- 作業系統
- W7
- 軟體版本
- 2003
- 閱讀權限
- 20
- 性別
- 男
- 註冊時間
- 2010-11-1
- 最後登錄
- 2017-5-20
|
23#
發表於 2013-10-29 21:47
| 只看該作者

我用以下的程式碼 出現以上圖的錯(之前不會有這問題) 另外奇怪的是 只要我是手動貼入 再手動點擊SUMBIT 網站都不會出錯呢 不知 如果改用FIREFOX 或GOOGLE的會好些?
有人能幫忙嗎?
Sub Test()
Dim oIe, myData As DataObject, x
Set myData = New DataObject '需引用 MS Form Object Library
With Sheets("自動計算表")
.Range(.[A4], .[F4].End(xlDown)).Copy
End With
myData.GetFromClipboard
Set oIe = CreateObject("internetExplorer.Application")
With oIe
'.Visible = False
.navigate "http://www.evepraisal.com"
Do While oIe.readystate <> 4: DoEvents: Loop
.document.getElementById("raw_textarea").innerText = myData.GetText '填入
.document.getElementById("result_submit").Click 'submit
Application.Wait Now + TimeValue("00:00:05") '等待5秒完成
Set x = .document.getElementById("results").tFoot.all.tags("span")
[L22].Value = x(0).innerText & " : " & x(3).innerText
[L23].Value = x(1).innerText & " : " & x(4).innerText
[L24].Value = x(2).innerText & " : " & x(5).innerText
.Quit
End With
End Sub |
|