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

[µo°Ý] ½Ð°Ý¦p¦ó¥HVBAÂ^¨úºô¯¸¤Wªº¸ê®Æ¡H

¦^´_ 1# mnsmrtl
¤£¤@©w­nVBA

TOP

¦^´_ 4# mnsmrtl
  1. Sub ·s¼W¬d¸ß()
  2.     Range("A1") = "2610"   'ªÑ²¼¥N¸¹
  3.     Range("A3").Select
  4.     With ActiveSheet.QueryTables.Add(Connection:= _
  5.         "URL;http://tw.stock.yahoo.com/q/q?s=" & Range("a1"), Destination:=Selection)  '·s¼W¬d¸ß
  6.         .FieldNames = True
  7.         .RowNumbers = False
  8.         .FillAdjacentFormulas = False
  9.         .PreserveFormatting = True
  10.         .RefreshOnFileOpen = False
  11.         .BackgroundQuery = True
  12.         .RefreshStyle = xlInsertDeleteCells
  13.         .SavePassword = False
  14.         .SaveData = True
  15.         .AdjustColumnWidth = True
  16.         .RefreshPeriod = 0
  17.         .WebSelectionType = xlSpecifiedTables
  18.         .WebFormatting = xlWebFormattingNone
  19.         .WebTables = "6"
  20.         .WebPreFormattedTextToColumns = True
  21.         .WebConsecutiveDelimitersAsOne = True
  22.         .WebSingleBlockTextImport = False
  23.         .WebDisableDateRecognition = False
  24.         .WebDisableRedirections = False
  25.         .Refresh BackgroundQuery:=False
  26.         .Name = .ResultRange.Cells(3, 1)
  27.     End With
  28.    End Sub
  29. '***** ¤w·s¼W«á¬d¸ß«á ¥i­×§ïA1ªºªÑ²¼¥N¸¹ ¬d¸ß  *****
  30. Sub §ó·s¬d¸ß()
  31.     With Range("A3").QueryTable
  32.         .Connection = "URL;http://tw.stock.yahoo.com/q/q?s=" & Range("a1") 'ªÑ²¼¥N¸¹¦b[A1]
  33.         .Refresh BackgroundQuery:=False
  34.         .Name = .ResultRange.Cells(3, 1)
  35.     End With
  36. End Sub
½Æ»s¥N½X

TOP

¦^´_ 6# mnsmrtl
¥t¥~·Q¦A½Ð±Ð¡A¦p¦ó¥u¦^¶Ç¨ä¤¤¤@­ÓÄæ¦ì¡H
½Ð°Ñ¦Ò http://forum.twbts.com/thread-3064-1-2.html

webtables="6"¡A­n«ç»ò¨ú±o¡H




TOP

        ÀR«ä¦Û¦b : ¡i¬O§_µo´§¤F¨}¯à¡H¡j¤H¶¡¹Ø©R¦]¬°µu¼È¡A¤~§óÅã±o¬Ã¶Q¡CÃø±o¨Ó¤@½ë¤H¶¡¡AÀ³°Ý¬O§_¬°¤H¶¡µo´§¤F¦Û¤vªº¨}¯à¡A¦Ó¤£­n¤@¨ý¨Dªø¹Ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD