- 帖子
- 5923
- 主題
- 13
- 精華
- 1
- 積分
- 5986
- 點名
- 0
- 作業系統
- win10
- 軟體版本
- Office 2010
- 閱讀權限
- 150
- 性別
- 男
- 來自
- 台灣基隆
- 註冊時間
- 2010-5-1
- 最後登錄
- 2022-1-23
        
|
64#
發表於 2012-12-4 08:13
| 只看該作者
回復 62# 198188
抱歉只能幫到 [貨櫃號碼登錄] 這裡
這http://www.maerskline.com/appmanager/maerskline/public?_nfpb=true&_nfls=false&_pageLabel=page_tracking3_trackSimple網頁
的貨物資料,一直無法下載到Excel
- Option Explicit
- Sub 貨櫃號碼登錄()
- Dim IE As New InternetExplorer, i As Integer, vDoc As Object
- '宣告 Dim ie As New InternetExplorer
- '須在工具-> 設定引用項目加入 新增引用 Microsoft Internet Controls
- 'Set IE = CreateObject("InternetExplorer.Application")
- 'Dim i As Integer, vDoc As Object
- With CreateObject("InternetExplorer.Application") '不需新增引用 Microsoft Internet Controls
- 'With IE
- .Visible = True
- .Navigate "http://www.maerskline.com/appmanager/"
- Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
- Set vDoc = .Document.getElementsByTagName("INPUT")
- For i = 0 To vDoc.Length - 1
- If vDoc(i).Name = "portlet_quickentries_2{actionForm.trackNo}" Then vDoc(i).Value = "PONU4867818" '貨櫃號碼
- If vDoc(i).Value = "Track" Then vDoc(i).Click '按下確定
- Next
- End With
- End Sub
複製代碼
回復 63# 198188
21 # stillfish00 已提出修正 ,你試試看,真不行再說 |
|