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

web¶×¤J¥~³¡¸ê®Æ«á..¶W³sµ²¤å¦r®ø¥¢

¦^´_ 1# go2hk
  1. Option Explicit
  2. Sub Ex()
  3.     Dim IE As New InternetExplorer, URL As String, A As Object
  4.     '«Å§i Dim ie As New InternetExplorer
  5.     '¶·¦b¤u¨ã-> ³]©w¤Þ¥Î¶µ¥Ø¥[¤J ·s¼W¤Þ¥Î Microsoft Internet Controls
  6.     URL = "http://stockchannel.sinotrade.com.tw/z/zg/zge/zge_EH000027_1.djhtm"
  7.     With IE
  8.         .Navigate URL
  9.       '  .Visible = True
  10.         Do While .Busy Or .readyState <> 4:         Loop
  11.         Set A = .document.getElementsByTagName("TABLE")
  12.         Ep A(2).outerHTML
  13.         .Quit
  14.     End With
  15. End Sub
  16. Sub Ep(S As String)
  17.     Dim D As New DataObject
  18.     'DataObject ª«¥ó ¦b¶i¦æÂà´«°Ê§@®É¡A°µ¬°®æ¦¡¤Æ¤å¦r¸ê®Æªº¼È¦s°Ï°ì¡C¨ä¤]¥i¥H¼È¦s©MÀx¦s¦b DataObject ªº¤å¦r¤ù¬q¬ÛÃöªº®æ¦¡¡C
  19.     '«Å§i Dim D As New DataObject
  20.     '¶·¦b¤u¨ã-> ³]©w¤Þ¥Î¶µ¥Ø¥[¤J ·s¼W¤Þ¥Î Microsoft Forms 2.0 Object Library ,±M®× ¥[¤J¤@ªí³æ§Y¥i
  21.     With D
  22.         .SetText S
  23.         .PutInClipboard
  24.         With ActiveSheet
  25.             .UsedRange.Clear
  26.              .Paste .[A1]
  27.             .Shapes.SelectAll
  28.             Selection.Delete
  29.             .Hyperlinks.Delete
  30.         End With
  31.     End With
  32. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ±o²z­nÄǤH¡A²zª½­n®ð©M¡C
ªð¦^¦Cªí ¤W¤@¥DÃD