當前位置:商標查詢大全網 - 彩票查詢 - 開獎號在線更新的宏

開獎號在線更新的宏

'3D-------------------------------------------------

Sub Macro1()

Dim v As Variant

Application.ScreenUpdating = False

Dim temp() As String, n As Long, i As Long

With CreateObject("InternetExplorer.Application")

.Visible = True

.navigate "/3d/3dwz1-0.htm"

Do Until .Readystate = 4

DoEvents

Loop

temp = Split(.Document.body.innertext, vbCrLf)

End With

Application.SendKeys "%{f4}"

'For i = 0 To UBound(temp)

n = 4 'start from line 4

For i = UBound(temp) To 0 Step -1

If temp(i) Like "200*" Then

v = Split(temp(i), " ")

If UBound(v) >= 4 Then

n = n + 1

'Cells(n, 1) = temp(i)

Cells(n, 1) = v(0)

Cells(n, 2) = v(2)

Cells(n, 3) = v(3)

Cells(n, 4) = v(4)

End If

End If

Next

[a:e].Columns.AutoFit

Application.ScreenUpdating = True

End Sub

'7Xing-------------------------------------------------

Sub Macro1()

Dim v As Variant

Application.ScreenUpdating = False

Dim temp() As String, n As Long, i As Long

With CreateObject("InternetExplorer.Application")

.Visible = True

.navigate "/qxc/qxcwz1-0.htm"

Do Until .Readystate = 4

DoEvents

Loop

temp = Split(.Document.body.innertext, vbCrLf)

End With

Application.SendKeys "%{f4}"

n=4

For i = UBound(temp) To 0 Step -1

If temp(i) Like "200*" Then

'Cells(n, 1) = temp(i)

v = Split(temp(i), " ")

If UBound(v) >= 9 Then

n = n + 1

'20080051 2008-05-04 6 6 9 5 6 5 + 0

Cells(n, 1) = v(0)

Cells(n, 2) = v(2)

Cells(n, 3) = v(3)

Cells(n, 4) = v(4)

Cells(n, 5) = v(5)

Cells(n, 6) = v(6)

Cells(n, 7) = v(7)

Cells(n, 8) = v(9)

End If

End If

Next

'[a:a].Parse "[xxxxxxxx] [xxxxxxxxxx] [x] [x] [x] [x] [x] [x] [x] [x]", [a1]

[a:h].Columns.AutoFit

Application.ScreenUpdating = True

End Sub