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

¤WÂd ­ÓªÑ¤é¦¨¥æ¸ê°T §ì¨ú°ÝÃD

¦^´_ 1# espionage
¸Õ¸Õ¬Ý
  1. With CreateObject("InternetExplorer.Application") '¶}±ÒÃÒ¨éÂd»O¶R½æ¤¤¤ßºô­¶
  2.         .Visible = True
  3.         .Navigate "http://www.tpex.org.tw/web/stock/aftertrading/daily_trading_info/st43.php?l=zh-tw"
  4.         Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
  5.         With .document
  6.             .getElementsByTAGName("INPUT")("input_stock_code").Value = stockcode
  7.             '--------------------¿é¤J­n¬d¸ßªº¤é´Á
  8.             With .getElementsByTAGName("INPUT")("input_date")
  9.                 .Value = yearmonth
  10.                 '*********************
  11.                 .fireEvent ("onchange") 'ie8¥i¥Î
  12.                 '·sª©ie ½Ð°Ñ¦Ò http://forum.twbts.com/thread-14308-1-1.html
  13.                 '**********************
  14.             End With
  15.         End With
  16.     End With
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 3# espionage
¤£¿ù¬O­nµ¥«Ýºô­¶ªº¸ê®Æ¤U¸ü§¹²¦
  1. Option Explicit
  2. Sub Ex()
  3.     Dim a As Object, stockcode
  4.     With CreateObject("InternetExplorer.Application") '¶}±ÒÃÒ¨éÂd»O¶R½æ¤¤¤ßºô­¶
  5.         .Visible = True
  6.         stockcode = 4111
  7.         .Navigate "http://www.tpex.org.tw/web/stock/aftertrading/daily_trading_info/st43.php?l=zh-tw"
  8.         Do While .Busy Or .readyState <> 4: DoEvents: Loop
  9.         With .Document
  10.             .getElementsByTAGName("INPUT")("input_stock_code").Value = stockcode
  11.             '--------------------¿é¤J­n¬d¸ßªº¤é´Á
  12.             With .getElementsByTAGName("INPUT")("input_date")
  13.                 .Value = "104/06" ' yearmonth
  14.                 '*********************
  15.                 .fireEvent ("onchange") 'ie8¥i¥Î
  16.                 '·sª©ie ½Ð°Ñ¦Ò http://forum.twbts.com/thread-14308-1-1.html
  17.                 '**********************
  18.             End With
  19.             With .getElementByID("stk_no")
  20.                 Do
  21.                     If .INNERTEXT = "½Ð¿é¤JªÑ²¼¥N½X¤Î¸ê®Æ¦~¤ë" Then
  22.                         MsgBox "½Ð¿é¤JªÑ²¼¥N½X¤Î¸ê®Æ¦~¤ë"
  23.                         GoTo ER
  24.                     End If
  25.                 Loop Until InStr(.INNERTEXT, stockcode)
  26.             End With
  27.             Set a = .getElementsByTAGName("table")
  28.             MsgBox .getElementByID("stk_no").INNERTEXT & vbLf & a(0).outertext
  29.         End With
  30. ER:
  31.         .Quit
  32.     End With
  33. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : §g¤l¦p¤ô¡AÀH¤è´N¶ê¡AµL³B¤£¦Û¦b¡C
ªð¦^¦Cªí ¤W¤@¥DÃD