Board logo

標題: 新手網路爬蟲求救 [打印本頁]

作者: jerryyen    時間: 2022-1-6 18:27     標題: 新手網路爬蟲求救

執行以下程式碼發生:執行階段錯誤'438'

Sub test()
Dim oIE3 As Object, oNode As Object
Set oIE3 = CreateObject("InternetExplorer.Application")
  Sheets("總表").Cells(8, 2).Clear
  With oIE3
  .Visible = True
  .navigate "公司內部網址", "JavaScript"
Do While .Busy Or .readyState <> 4: DoEvents: Loop
    .document.getelementbyid("RB_Current").Checked = Checked
    .document.getelementbyid("RB_LPDA").Checked = Checked
    .document.forms(0).All("btnExcel").Click
     Do While .Busy Or .readyState <> 4: DoEvents: Loop
    'If Application.Wait(Now + TimeValue("0:00:02")) Then
    Sheets("總表").Cells(8, 2) = oIE3.document.getfullpath("/html/body/form/div[2]/div[4]/a").href
   End With
oIE3.Quit
End Sub




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