返回列表 上一主題 發帖

[發問] 抓網頁資料問題

[發問] 抓網頁資料問題

本帖最後由 ck00 於 2012-7-5 12:55 編輯

我想問一下,如何在使用ie.navigate 連線並登入網頁後,
透過連線至網址,跳至同一網頁的其他頁面,
複製id="abc"的table至worksheet?

Sub portalLog()
    Dim User As String, Pwd As String

        Set ie = CreateObject("InternetExplorer.application")
        ie.Visible = True
        ie.navigate "https://login.yahoo.com/config/mail?.intl=tw"
        With ie
            Do While .busy: DoEvents: Loop
            Do While .ReadyState <> 4: DoEvents: Loop
        End With
        
        Application.EnableCancelKey = False
        With ie
            .Document.getElementsByTagName("input")(1).Value = "username"
            .Document.getelementbyID("password").Value = "password"
            .Document.getElementsByTagName("input")(3).Click
        End With
        Application.EnableCancelKey = True
        
        With ie
            Do While .busy: DoEvents: Loop
            Do While .ReadyState <> 4: DoEvents: Loop
        End With
        
如何在此連線至己登入網頁的其他頁面,然後再根據TABLE的ID把他複製
        Set ie = Nothing
End Sub

輕輕推一推

TOP

        靜思自在 : 【時間成就一切】時間可以造就人格,可以成就事業,也可以儲積功德。
返回列表 上一主題