- 帖子
- 6
- 主題
- 3
- 精華
- 0
- 積分
- 9
- 點名
- 0
- 作業系統
- WIN7
- 軟體版本
- office2013
- 閱讀權限
- 10
- 性別
- 女
- 註冊時間
- 2018-8-16
- 最後登錄
- 2021-2-4
|
本帖最後由 lovefree0707 於 2019-11-16 15:01 編輯
請教各位大大高手,我在做作業
有關巨集迴圈問題~我抓今彩539的各期開獎資料換算機率
可是我用巨集作資料的時候,發現如果需要歷年資料他有很多頁啊
我先用WEB更新資料,但很多頁我不怎麼怎麼改有大大可以教我嗎??感謝~~
這部份我還在學習請大大高手前輩們指導一下,感謝!!
Sub 多頁樂透號碼()
'
' 多頁樂透號碼 巨集
'
' 快速鍵: Ctrl+Shift+P
'
Application.CutCopyMode = False
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://lotto.bestshop.com.tw/539/list.asp
", Destination:=Range("$A$1"))
.CommandType = 0
.Name = "list"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "9"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
ActiveWindow.SmallScroll Down:=30
End Sub
|
|