- ©«¤l
- 25
- ¥DÃD
- 4
- ºëµØ
- 0
- ¿n¤À
- 50
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-31
- ³Ì«áµn¿ý
- 2014-6-8
|
[µo°Ý] [½Ð±Ð]ӪѦ¨¥æ¸ê°T¥HVBAÂ^¨ú¤§°ÝÃD...
¦U¦ì¤j¤j½Ð±Ð¤@¤U:
§Ú·Q±qÃÒ¥æ©ÒªºÓªÑ¤é¦¨¥æ¸ê°TÂ^¨ú¸ê®Æ,
§Æ±æ¬O¯à°÷¥ÑEXCELªí®æ¤º¿é¤J"ªÑ²¼¥N½X"&"¦~"&"¤ë",¨Ó§ó·sdata,
¥H¤U¥¨¶°¬O°Ñ¦Ò§O¤Hªº¼gªk¶i¦æקï,
¦ý¬O¤@ª½¨S¿ìªk±N¸ê®Æ§ì¶i¨Ó,
½Ð°Ý¦U¦ì¤j¤j¬O¥¨¶°¦³þ¸Ì¼g¿ù¤F¶Ü?
ÁÙ¬O¥i¥H¦³§ó¦nªº¼gªk???
ÁÂÁÂ!!- Sub ӪѤ馨¥æ¸ê°T()
- '
- Dim ptxt As String
- Dim STK_NO, myear, mmon
- myear = InputBox("¿é¤J¬d¸ß¥Á°ê¦~", "ӪѤ馨¥æ¸ê°T")
- If myear = "" Then Exit Sub
- mmon = InputBox("¿é¤J¬d¸ß¤ë", "ӪѤ馨¥æ¸ê°T")
- If mmon = "" Then Exit Sub
- STK_NO = InputBox("¿é¤JӪѥN½X", "ӪѤ馨¥æ¸ê°T")
- If STK_NO = "" Then Exit Sub
- With ActiveSheet.QueryTables.Add(Connection:= _
- "URL;http://www.twse.com.tw/ch/trading/exchange/STOCK_DAY/STOCK_DAYMAIN.php" _
- , Destination:=Range("A1"))
- .PostText = "ajax=true&myear=" & myear & "&mmon=" & mmon & "&STK_NO=" & STK_NO
- .PreserveFormatting = False
- .RowNumbers = False
- .FillAdjacentFormulas = False
- .RefreshOnFileOpen = False
- .BackgroundQuery = True
- .RefreshStyle = xlInsertDeleteCells
- .SavePassword = False
- .SaveData = True
- .AdjustColumnWidth = True
- .RefreshPeriod = 0
- .WebSelectionType = xlSpecifiedTables
- .WebFormatting = xlWebFormattingNone
- .WebTables = "8"
- .WebPreFormattedTextToColumns = True
- .WebConsecutiveDelimitersAsOne = True
- .WebSingleBlockTextImport = False
- .WebDisableDateRecognition = False
- .WebDisableRedirections = False
- .Refresh BackgroundQuery:=False
-
- End With
- End Sub
½Æ»s¥N½X |
|