ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

EXCELºô­¶¬d¸ß¦p¦óÁ׶}¤£¦s¦bºô­¶

¦^´_ 1# chwqk
¸Õ¸Õ¬Ý
  1. Sub Macro1()
  2.     On Error Resume Next
  3.     For I = 1 To 12
  4.     If I < 10 Then
  5.     M = "0" & I
  6.     Else: M = I
  7.     End If
  8.     RD = "99" & M
  9.     MsgBox RD
  10.     Sheets("´î¸ê¬d¸ß").Select
  11.     Range("A1").Select
  12.     With Selection.QueryTable
  13.         .Connection = _
  14.         "URL;http://www.twse.com.tw/docs1/data01/market/public_html/b" & RD & ".txt"
  15.         .WebSelectionType = xlEntirePage
  16.         .WebFormatting = xlWebFormattingNone
  17.         .WebPreFormattedTextToColumns = True
  18.         .WebConsecutiveDelimitersAsOne = True
  19.         .WebSingleBlockTextImport = False
  20.         .WebDisableDateRecognition = False
  21.         .WebDisableRedirections = False
  22.         .Refresh BackgroundQuery:=False
  23.     End With
  24.     If Err > 0 Then
  25.         MsgBox "¬d¤£¨ì " & RD
  26.         Err.Clear
  27.     End If
  28.     Next I
  29. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : °µ¦n¨Æ¤£¯à¤Ö§Ú¤@¤H¡A°µÃa¨Æ¤£¯à¦h§Ú¤@¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD