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

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

ª©¥D¤j¤j§A¦n¡G
       
   ¤p§Ì¹ï³z¹LEXCEL¨ú±oºô­¶¸ê®Æ¡A
¤@ª½²`²`·P¨ì¿³½ì¦ý¬OµLªk»â·|¤Î¬ð¯}§x¹Ò¡C
   ²{·Q­É¥Î¦¹ªO¤ÎªO¥D¤j¤j´£¨Ñªº»yªk¡C
¨Ã¨ú±o¦¹ºô­¶ªº«ü©w¦ì¸m¤º®e¦p¤U¡G

¤@¡B
   ºô§}¡Ghttp://tw.stock.yahoo.com/d/s/company_1102.html

¤G¡B
   ¨ú±o¦¹ºô­¶ªº¸ê®Æªí¬°

Àò §Q ¯à ¤O (100²Ä2©u) ³Ì·s¥|©u¨CªÑ¬Õ¾l  ³Ìªñ¥|¦~¨CªÑ¬Õ¾l

¤T¡B
  ¤p§Ì¦³¸ÕµÛª½±µ±N¤U¦C»yªkªººô§}§ó¥¿
¦p¤Wªººô§}¦ý¬OµLªk¦¨¥\¡C
¯à½Ðª©¥D¤j¤j«üÂI¤p§Ì¡C

·P®¦¤j¤j¡G


Sub ·s¼W¬d¸ß()
    Range("A1") = "2610"   'ªÑ²¼¥N¸¹
    Range("A3").Select
    With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;http://tw.stock.yahoo.com/q/q?s=" & Range("a1"), Destination:=Selection)  '·s¼W¬d¸ß
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .BackgroundQuery = True
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .WebSelectionType = xlSpecifiedTables
        .WebFormatting = xlWebFormattingNone
        .WebTables = "6"
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .WebDisableRedirections = False
        .Refresh BackgroundQuery:=False
        .Name = .ResultRange.Cells(3, 1)
    End With
   End Sub
'***** ¤w·s¼W«á¬d¸ß«á ¥i­×§ïA1ªºªÑ²¼¥N¸¹ ¬d¸ß  *****
Sub §ó·s¬d¸ß()
    With Range("A3").QueryTable
        .Connection = "URL;http://tw.stock.yahoo.com/q/q?s=" & Range("a1") 'ªÑ²¼¥N¸¹¦b[A1]
        .Refresh BackgroundQuery:=False
        .Name = .ResultRange.Cells(3, 1)
    End With
End Sub

TOP

ÁÂÁÂoobirdª©¥D¤j¤j¡C
·PÁ±zÀ°¤p§Ì¶}±Ò³o¤@®°¤jªù¡A
¦P®É¤]À°¤p§Ì·h¶}¤ß¤¤ªº¤@¶ô
¤j¥ÛÀY¡C
¤@»yÂI¿ô¦p¦¹¦n¥ÎªºEXCEL
¿ý»s¥\¯à¡A¤p§Ì«o±N¥¦¿ò§Ñ¡C

¥t¤p§Ì·Q«Å§i³]©w
DIM qtQtrResults AS ......
¤~¯àÅý¥¦¦bWITH qtQtrResults®É
¯àÅã¥Ü¥X¨äÄݩʤΥ\¯à©O¡H
With qtQtrResults
    .WebFormatting = xlNone
    .WebSelectionType = xlSpecifiedTables
    .WebTables = "9"
    .Refresh
End With

·P®¦¤j¤j¡I

TOP

ÁÂÁÂoobirdª©¥D¤j¤j¡C
·PÁ±z¤Þ»â¤p§Ì¶i¤J
¥t¤@­Ó·sªº»â°ì¡C

·P®¦¤j¤j¡I

TOP

        ÀR«ä¦Û¦b : ¯àµ½¥Î®É¶¡ªº¤H¡A¥²¯à´x´¤¦Û¤v§V¤Oªº¤è¦V¡C
ªð¦^¦Cªí ¤W¤@¥DÃD