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

¦b windows7 Àô¹Ò§ì¤£¨ì¸ê®Æ??

¦b windows7 Àô¹Ò§ì¤£¨ì¸ê®Æ??

¥»©«³Ì«á¥Ñ t8899 ©ó 2015-3-5 07:04 ½s¿è

office 2003
¦bwindows xp ¤U¤@¤Á¥¿±`
¦bwindows 7§ì¤£¨ì¸ê®Æ???(¦ý¦p¥ÎF8,³æ¨B°õ¦æ«h§ìªº¨ì)
´úÅçµo²{¦b .Document.BODY.innerHTML = .Document.getElementsByTagName("table")(4).outerHTML §ì¤£¨ì¸ê®Æ
Book2.zip (20.2 KB)

¥»©«³Ì«á¥Ñ t8899 ©ó 2015-3-7 07:31 ½s¿è
¦^´_  t8899

µ{¦¡¶]ªº¤ñIE¤U¸ü¸ê®Æ³t«×§Ö,¥u¦nµ¥¥¦¤@¤U
GBKEE µoªí©ó 2015-3-6 14:06

§Ú­èµo²{
Application.Wait Time + #12:00:01 AM#
À³¸Ó¥[¦b   If InStr(.Document.BODY.innerText, "¬dµL¸ê®Æ") Then  ªº«e­± ¤~¹ï?

TOP

¦^´_ 7# t8899

³o¦æ¤£¬O¸Ñ¨M³oºØ°ÝÃD??  Do While .Busy Or .readyState <> 4: DoEvents

À³¸Ó¬Oªº,¦ý¥¦¤£¦æ¤]¨S»³£«

EX.JPG (88.3 KB)

EX.JPG

·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2015-3-6 14:28 ½s¿è
¦^´_  t8899

µ{¦¡¶]ªº¤ñIE¤U¸ü¸ê®Æ³t«×§Ö,¥u¦nµ¥¥¦¤@¤U
GBKEE µoªí©ó 2015-3-6 14:06


ÁÂÁ«ü¾É!
³o¦æ¤£¬O¸Ñ¨M³oºØ°ÝÃD??  Do While .Busy Or .readyState <> 4: DoEvents

TOP

¦^´_ 5# t8899

µ{¦¡¶]ªº¤ñIE¤U¸ü¸ê®Æ³t«×§Ö,¥u¦nµ¥¥¦¤@¤U
  1. Application.Wait Time + #12:00:01 AM#  'ºCºC¦a¤@¬í¤@¬í¥[¤Wª½¨ì¥¿±`¬°¤î
  2.         Do
  3.             Set A = .Document.getElementsByTagName("table")
  4.         Loop Until A.Length = 6
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_  t8899
¦A¸Õ¸Õ¬Ý
GBKEE µoªí©ó 2015-3-6 09:19

¬O¨S°ÝÃD¤F
¦ý¸ê®Æªº¤é´Á°¸¦Ó·|§ì¨ì «e1¤é
¤µ¤é©|¥¼¦¬½L¡AÀ³§ì¨ì 3/5 , ¸Õ5¦¸¦³1¦¸§ì¨ì3/4

TOP

¦^´_ 3# t8899
¦A¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub ABC123()
  3.     Dim XDate As Date, A As Object
  4.     Application.ScreenUpdating = False
  5.     Sheets("3").Select
  6.     XDate = Date
  7.     With CreateObject("InternetExplorer.Application")
  8.         .Visible = False
  9.         .Navigate "http://www.twse.com.tw/ch/trading/exchange/MI_INDEX/MI_INDEX.php"
  10. 330:
  11.         Do While .Busy Or .readyState <> 4: DoEvents: Loop
  12.             .Document.ALL("qdate").Value = Format(XDate, "E/MM/DD")  '¤é´Á¥i­×§ï
  13.             .Document.ALL("selectType").Value = "ALLBUT0999"
  14.             .Document.ALL("query-button").Click
  15.         Do While .Busy Or .readyState <> 4: DoEvents: Loop
  16.         If InStr(.Document.BODY.innerText, "¬dµL¸ê®Æ") Then
  17.             XDate = XDate - 1
  18.             GoTo 330
  19.         End If
  20.         Do
  21.             Set A = .Document.getElementsByTagName("table")
  22.         Loop Until A.Length = 6
  23.         .Document.BODY.innerHTML = A(4).outerHTML
  24.         Do While .Busy Or .readyState <> 4: DoEvents: Loop
  25.         .ExecWB 17, 2       '  Select All
  26.         .ExecWB 12, 2       '  Copy selection
  27.         With Sheets("3")    '¥i«ü©w¤u§@ªí
  28.             .UsedRange.Clear
  29.             .Range("A1:P1000").ClearContents
  30.             .Range("A2").Select
  31.             .PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NOHTMLFormatting:=True
  32.         End With
  33.         .Quit        'Ãö³¬ºô­¶
  34.     End With
  35. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_  t8899
¸Õ¸Õ¬Ý
GBKEE µoªí©ó 2015-3-5 08:51


¦³®É¥i¥H¡A¦³®É¤S¤£¥i¥H
¤£¥i¥Hªº¦¸¼Æ¸û¦h!

TOP

¦^´_ 1# t8899
¸Õ¸Õ¬Ý
  1. Do While .Document.getElementsByTagName("table")(4).outerHTML = "": Loop
  2.         .Document.BODY.innerHTML = .Document.getElementsByTagName("table")(4).outerHTML
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¤H­nª¾ºÖ¡B±¤ºÖ¡B¦A³yºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD