- 帖子
- 63
- 主題
- 15
- 精華
- 0
- 積分
- 81
- 點名
- 0
- 作業系統
- win7
- 軟體版本
- office2007
- 閱讀權限
- 20
- 註冊時間
- 2014-3-16
- 最後登錄
- 2015-9-20
|
設迴圈
我想要從第一個網址匯入外部資料、第二個網址匯入外部資料.....到第五個,請問我該如何設立一個迴圈?
迴圈.rar (7.53 KB)
以下是我匯入的第一個網址的外部資料- ' 擷取網路資料
- Range("C3").Select
- ActiveCell.FormulaR1C1 = _
- "http://www.atpworldtour.com/Tennis/Players/Ac/R/Ricardo-Acioly.aspx"
- Sheets("擷取資料").Select
- Range("A1").Select
- With ActiveSheet.QueryTables.Add(Connection:= _
- "URL;http://www.atpworldtour.com/Tennis/Players/Ac/R/Ricardo-Acioly.aspx", _
- Destination:=Range("$A$1"))
- .Name = "Ricardo-Acioly"
- .FieldNames = True
- .RowNumbers = False
- .FillAdjacentFormulas = False
- .PreserveFormatting = True
- .RefreshOnFileOpen = False
- .BackgroundQuery = True
- .RefreshStyle = xlInsertDeleteCells
- .SavePassword = False
- .SaveData = True
- .AdjustColumnWidth = True
- .RefreshPeriod = 0
- .WebSelectionType = xlEntirePage
- .WebFormatting = xlWebFormattingNone
- .WebPreFormattedTextToColumns = True
- .WebConsecutiveDelimitersAsOne = True
- .WebSingleBlockTextImport = False
- .WebDisableDateRecognition = False
- .WebDisableRedirections = False
- .Refresh BackgroundQuery:=False
- End With
複製代碼 |
|