- 帖子
- 4901
- 主題
- 44
- 精華
- 24
- 積分
- 4916
- 點名
- 142
- 作業系統
- Windows 7
- 軟體版本
- Office 20xx
- 閱讀權限
- 150
- 性別
- 男
- 來自
- 台北
- 註冊時間
- 2010-4-30
- 最後登錄
- 2026-7-16
                
|
本帖最後由 Hsieh 於 2011-3-11 10:47 編輯
回復 6# FAlonso
直接寫入儲存格,不須先寫入陣列
這重點只是取出下拉選單內容的語法- Sub abc()
- Dim myURL As String,i As Integer
- Set myie = Nothing
- Set myie = CreateObject("internetexplorer.application")
- myURL = "http://tw.weather.yahoo.com/"
- With myie
- .Navigate myURL
- .Visible = False
- Do While .Busy And .ReadyState <> READYSTATE_COMPLETE
- DoEvents
- Loop
- For i = 0 To .Document.all("select").Options.Length - 1
- Cells(i + 1, 1) = .Document.all("select").Options(i).innertext
- Next
- .Quit
- End With
- End Sub
複製代碼 |
|