- ©«¤l
- 40
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 83
- ÂI¦W
- 0
- §@·~¨t²Î
- winxp
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2011-6-3
- ³Ì«áµn¿ý
- 2020-10-1
|
Sheets("¤WÂdªÑ²¼").Activate
With CreateObject("InternetExplorer.application") '³Ð«Ø¤@ӪŪºie
.Visible = True 'Åýie¥i¨£
.Navigate "http://www.gretai.org.tw/web/stock/aftertrading/broker_trading/brokerBS.php?l=zh-tw"
Do Until .ReadyState = 4 'µ¥«Ýie§¹²¦¸ü¤J
DoEvents
Loop
code = InputBox("¿é¤J¬d¸ßcode", "code", code)
For Each stock In Range([a2], [a65536].End(xlUp))
.document.All("stk_code").Value = stock
.document.All("auth_num").Value = code 'Cells(1, 1)
With Sheets("web")
.Cells.Delete
.QueryTables.Add Connection:="URL;", Destination:=.Range("A1")
DoEvents
With .QueryTables.Add(Connection:="URL;http://www.gretai.org.tw/web/stock/aftertrading/broker_trading/download_ALLCSV.php?curstk=" & stock & "&stk_date=" & ¤é´Á & "&auth=" & code & "", Destination:=.[a1])
.AdjustColumnWidth = False
.WebFormatting = xlWebFormattingNone
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With
.Columns("A:A").TextToColumns Destination:=.Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), _
Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1)), _
TrailingMinusNumbers:=True
If .[a4] = " " Then .Cells.Delete: GoTo a
End With
If Sheets("web").[a4] = "ÅçÃÒ½X¤w¹O´Á¡A½Ð«·s¬d¸ß" Then
stock.Offset(, 2) = "ng"
.Quit
.Visible = True 'Åýie¥i¨£
.Navigate "http://www.gretai.org.tw/web/stock/aftertrading/broker_trading/brokerBS.php?l=zh-tw"
Do Until .ReadyState = 4 'µ¥«Ýie§¹²¦¸ü¤J
DoEvents
Loop
code = InputBox("¿é¤J¬d¸ßcode", "code", code)
GoTo a
End If
¾ã¶¤U¸ü '¸ê°T¾ã²z
a:
Next
End With
µ{§Ç«Ü¶Ã¬Û¤¬°Ñ¦Ò¤@¤U! |
|