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

[µo°Ý] ¦p¦ó²¤¹Lºô­¶ªº¿ù»~°T®§?

[µo°Ý] ¦p¦ó²¤¹Lºô­¶ªº¿ù»~°T®§?

¤U¦C¼Ò²Õ¦]¬°ºô§}¿ù»~¡A·|²£¥Í¥Xºô­¶ªº¿ù»~°T®§¡A­n¦p¦ó²¤¹Lºô­¶ªº¿ù»~°T®§©O?
  1. Function test()

  2. On Error Resume Next '§Y«K¿ù»~Ä~Äò¤]·|¥X²{¿ù»~°T®§
  3. ayear = 2016 '±q2016¶}©l
  4. stockid = "6244.tw"
  5. With ActiveSheet.QueryTables.Add(Connection:= _
  6.     "TEXT;http://ichart.finance.yahoo.com/table.csv?s=" & stockid & "&a=00&b=4&c=" & ayear & "&d=" & Month(Date) & "&e=" & Day(Date) & "&f=" & Year(Date) & "&g=d&ignore=.csv" _
  7.     , Destination:=Range("A1"))
  8.     .Name = "stockprice"
  9.     .FieldNames = True
  10.     .RowNumbers = False
  11.     .FillAdjacentFormulas = False
  12.     .PreserveFormatting = True
  13.     .RefreshOnFileOpen = False
  14.     .RefreshStyle = xlOverwriteCells
  15.     .SavePassword = False
  16.     .SaveData = True
  17.     .AdjustColumnWidth = True
  18.     .RefreshPeriod = 0
  19.     .TextFilePromptOnRefresh = False
  20.     .TextFilePlatform = 950
  21.     .TextFileStartRow = 2
  22.     .TextFileParseType = xlDelimited
  23.     .TextFileTextQualifier = xlTextQualifierDoubleQuote
  24.     .TextFileConsecutiveDelimiter = False
  25.     .TextFileTabDelimiter = True
  26.     .TextFileSemicolonDelimiter = False
  27.     .TextFileCommaDelimiter = True
  28.     .TextFileSpaceDelimiter = False
  29.     .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1)
  30.     .TextFileTrailingMinusNumbers = True
  31.     .Refresh BackgroundQuery:=False '³o­Ó¦a¤è¥u­nºô§}¿ù»~´N·|¥X²{¿ù»~°T®§¡A¦p¦ó¿ù»~¤§«á²¤¹L¿ù»~°T®§?
  32. End With

  33. End Function
½Æ»s¥N½X
PKKO

        ÀR«ä¦Û¦b : §g¤l¥ß«í§Ó¡A¤p¤H«í¥ß§Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD