- ©«¤l
- 60
- ¥DÃD
- 26
- ºëµØ
- 0
- ¿n¤À
- 93
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- Windows 7
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2014-9-8
- ³Ì«áµn¿ý
- 2020-4-15
|
¦^´_ 9# GBKEE
Hi GBKEE±z¦n
¬Ý¨ì±zªºµ{¦¡½X ·Q§â¥L×¥¿¦¨ ӪѪº¶°«O¤é´Á
·í²Ä¤@µ§¤é´Á¿é¤J®É¶ñ¤J A1Ä椤
¦ý¬O²Ä¤Gµ§¸ê®Æ¿é¤J®É¶ñ¤JA28Ä椤
¥H¦¹Ãþ±À¨C¤@µ§¸ê®Æ¶ñ¤J«á³£»Ý¶¡¹j28Äæ¦ì,
¥Ø«e§Ú¥u¦³×¥¿¨ì¥i¥H«½Æ¶ñ¤J¤é´Áªº³¡¤À,½Ð±ÐGBKEE «e½ú ¤£ª¾n¦p¦óקï,¥i§_´£ÂI°g¬z ·PÁ±z\QQ/
¥H¤U¬°×¥¿µ{¦¡½X
Dim Ar(), a, i As Integer, strDate As String, stkno As String, Qur As String
With CreateObject("InternetExplorer.Application")
.Navigate "http://www.tdcc.com.tw/smWeb/QryStock.jsp"
Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
Set a = .Document.ALL.tags("option") '¸ê®Æ¤é´Áªº¤º®e
ReDim Ar(a.Length - 1)
For i = 0 To a.Length - 1
Ar(i) = a(i).innerHTML
Next
.Quit
End With
For DateVar = 0 To 28
strDate = Ar(DateVar) '¾É¤J·í¤ë¤é´Á
Do
strDate = InputBox(Join(Ar, vbTab), "¶°«O¤áªÑÅv¤À´²ªí¬d¸ß ¤§ ¦³®Ä¤é´Á", strDate)
If strDate = "" Then Exit Sub
Loop Until IsNumeric(Application.Match(strDate, Ar, 0))
stkno = InputBox("¿é¤JªÑ²¼¥N¸¹", "ªÑ²¼¥N¸¹", 2313) '
If stkno = "" Then Exit Sub
Qur = "http://www.tdcc.com.tw/smWeb/QryStock.jsp?SCA_DATE=" & strDate & "&SqlMethod=StockNo&StockNo=" & stkno & "&StockName=&sub=%ACd%B8%DF"
With ActiveSheet
For WriteDate = 1 To 1
If .QueryTables.Count = 0 Then
.QueryTables.Add "URL;" & Qur, .[A & WriteDate * 28 * (WriteDate) ]
Else
.QueryTables(1).Connection = "URL;" & Qur
End If
With .QueryTables(1)
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "6,7,8"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Next
End With
Next |
|