- ©«¤l
- 184
- ¥DÃD
- 45
- ºëµØ
- 0
- ¿n¤À
- 407
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN 7
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-8-19
- ³Ì«áµn¿ý
- 2024-11-1
|
¦^´_ 72# GBKEE - Option Explicit
- Private Sub ¤j½L¦¨¥æ¸ê°T()
- Dim xlTheYear As String, xlTheMonth As String, STK_NO As String, xlTheFile As String
- Dim Sh As Worksheet
- xlTheYear = Format(Range("C1"), "0000") 'קï¦r¦ê®æ¦¡
- xlTheMonth = Format(Range("C2"), "00") 'קï¦r¦ê®æ¦¡
- STK_NO = Format(Range("C3"), "0000") 'קï¦r¦ê®æ¦¡
- Set Sh = ThisWorkbook.Sheets.Add '·s¼W¤u§@ªí
- Sh.Name = xlTheYear & "_" & xlTheMonth '·s¼W¤u§@ªí©R¦W
- xlTheFile = "http://www.twse.com.tw/ch/trading/exchange/FMTQIK/FMTQIK2.php?STK_NO=" & STK_NO & "&myear=" & xlTheYear & "&mmon=" & xlTheMonth & "&type=csv"
- xlTheFile = "http://www.twse.com.tw/ch/trading/exchange/BWIBBU/BWIBBU.php?STK_NO=" & STK_NO & "&myear=" & xlTheYear & "&mmon=" & xlTheMonth
- With Workbooks.Open(xlTheFile)
- .Sheets(1).UsedRange.Copy Sh.[a1]
- .Close 0
- End With
- Sh.Cells.EntireColumn.AutoFit '½Õ¾ãÄæ¼e
- Sh.Columns("A:A").ColumnWidth = 28.56
- End Sub
½Æ»s¥N½X ª©¤j
§Ú©w¸q¤FSTK_NO(ªÑ²¼¥N½X)
¥i¬O¶]¤£¥X¨Ó |
|