ªð¦^¦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 : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD