Dim mSht As Worksheet
Dim mRng As Range
Dim mRow As Long, i%
Dim myURL As String
Dim myWebTbl As String
Set mSht = Worksheets(1)
'MsgBox mSht.Name
With mSht
myURL = "URL;http://www.taiwanlottery.com.tw/Lotto/Lotto649/history.aspx" '任意的URL"
'指定讀入表單
For i = 1 To 100 Step 10
myWebTbl = i
'Worksheets.Add '新增工作表
With ActiveSheet.QueryTables.Add(Connection:=myURL _
, Destination:=.[a65536].End(xlUp).Offset(1)) '讀入目標儲存格
.WebFormatting = xlWebFormattingNone '文字或HTML
.WebTables = myWebTbl
.Refresh
End With
Next
End With
End Sub