返回列表 上一主題 發帖

關於CreateObject("InternetExplorer.Application")的使用

關於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
複製代碼

回復 1# av8d


    問題已解決~重開機即可= =

TOP

回復 1# av8d


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

我找了整天了說

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

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

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

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

TOP

        靜思自在 : 滴水成河。粒米成蘿,勿輕己靈,勿以善小而不為。
返回列表 上一主題