Board logo

標題: 關於CreateObject("InternetExplorer.Application")的使用 [打印本頁]

作者: av8d    時間: 2013-7-25 15:24     標題: 關於CreateObject("InternetExplorer.Application")的使用

當我放在UserForm1內執行時,會執行非常久都沒反應。
  1. Private Sub CommandButton1_Click()
  2. '帳密驗證
  3.     With CreateObject("InternetExplorer.Application")
  4.         .Navigate "https://tw.yahoo.com"
  5.    
  6.         Do While .Busy Or .ReadyState <> 4
  7.             DoEvents
  8.         Loop
  9.         .Document.all("username").innerText = "A"
  10.         .Document.all("password").innerText = "B"
  11.         .Document.all("submit2").Click
  12.         .Visible = True
  13.     End With
  14.                
  15.     With CreateObject("InternetExplorer.Application")
  16.         .Navigate "https://tw.yahoo.com"
  17.    
  18.         Do While .Busy Or .ReadyState <> 4
  19.             DoEvents
  20.         Loop
  21.         .Document.all("username").innerText = "A"
  22.         .Document.all("password").innerText = "B"
  23.         .Visible = True
  24.     End With
  25. End Sub
複製代碼

作者: av8d    時間: 2013-7-25 16:12

回復 1# av8d


    問題已解決~重開機即可= =
作者: handsometrowa    時間: 2013-7-29 12:26

回復 1# av8d


    請問版友
關於這個物件,是不是EXCEL VBE 說明裡面都找不到阿

我找了整天了說

要建立一個物件 開啟 一個IE  這個  

CreateObject("internetexplorer.application") '使用此方式可以免除 "設定引用項目"

有詳細的說明方式嗎  他後面的幾個屬性

我都想要了解說  謝謝您了^^"




歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)