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

¤U¸ü´Á³f¸ê®Æ¦Ü¤u§@ªí QueryTable¥X¿ù

¤U¸ü´Á³f¸ê®Æ¦Ü¤u§@ªí QueryTable¥X¿ù

«e½ú¦n µ{¦¡¦p¤U¡G

Option Explicit

Sub text()
  Dim myIE As InternetExplorer
  Dim myItem
  Dim QryTbl As QueryTable
  Dim myItems
  Dim WebAddress As String
  Dim mydate As Date
  Set myIE = New InternetExplorer
  With myIE
    .Visible = True
    .Navigate "http://www.taifex.com.tw/chinese/3/3_1_1.asp"
    Do Until .ReadyState = READYSTATE_COMPLETE
    Loop
  End With
  With myIE.Document.myform
    .COMMODITY_IDt.Value = "TF"                 '³]©w«´¬ù
  End With
  Set myItems = myIE.Document.getElementsByTagName("Input")
  For Each myItem In myItems
    If myItem.Value = "°e¥X¬d¸ß" Then
      myItem.Click                              '«ö¤U°e¥X¬d¸ß«ö¶s

End If
  Next
  With Worksheets("Á{®É¸ê®Æ2")
    .Cells.Clear
    Set QryTbl = .QueryTables.Add("URL;" & WebAddress, .Range("A1"))
  End With
  
  QryTbl.Refresh True

End Sub
----------------------------
¿ù»~¤@ª½¥d¦b³o¦C
  QryTbl.Refresh True
·Q½Ð±Ð¦³¤°»ò¤è¦¡¯à¸Ñ¨M¦¹°ÝÃD ..
·PÁ¦^ÂÐ:)
:)

¦nªº ·PÁ½Ѧì¤j¤j !!
:)

TOP

°ò¥»¤W²Ä¤G¦¸¨Ï¥Î
  1. Do Until .readyState = READYSTATE_COMPLETE: DoEvents: Loop
½Æ»s¥N½X
¤w¸g¨S¦³®Ä¤F¡A¦]¬°µ{¦¡¶]±o¤ñ¸û§Ö¡A·|§ì¨ì²Ä¤@¦¸ªºª¬ºA

¥u¬O§Ú·Q¤£¨ì¦³¤°»ò¤ñ¸û§¹¬üªº¸Ñ¨M¿ìªk¡A³B²z¤j¶q°õ¦æ®É¡A¥i¥H³B²z©µ¿ðªº°ÝÃD

TOP

¦^´_ 9# GBKEE
§Ú¤w±N±zªº«ü¤Þ (do until) §ï¦^¡C¥D­n¥Øªº§Ú¥u¬O¦b
´ú¸Õ¥¦ªºÀô¹Ò°õ¦æ¤§¹Lµ{»yµ²ªG¡A®{¼W±`¨£»D§OµL¥L·N¡C
ÁÂÁ±zªº¤£§[«ü¾É¡C
ªþ¤W­è¤~¤£Â_°õ¦æ©Ò¤@ª½²£¥Íªº¤­ºØª¬ªp¡A
³Ì«á¤@¦¸¤~¨£¦¨ªG¡C
·Q¥²¬Oºô¸ôÀW¼e°õ¦æ·í®É³t²v®Ä¯q¤§Ãö«Y§a¡I

TOP

¦^´_ 8# c_c_lai
«öF8 ³v¨B¤@¦æ¤@¦æ°õ¦æµ{¦¡½X¬O¨S°ÝÃDªº.¦ýF5°õ¦æµ{§Ç·|¥X²{°ÝÃDªº.
  1. Do Until .readyState = 4 And Not .Busy: DoEvents: Loop
½Æ»s¥N½X
³oµ{¦¡½XÁöµM¬Oµ¥­Ô IE.readyState ="§¹¦¨" ,IE Not .Busy  ¤£¦£¸L ,¤§«á

¦ýºô¸ô¸ê®Æªº¤U¸ü³t«×,ÁÙ¬O¤ñµ{¦¡°õ¦æªº³t«×ºC,
¾É­P myItems ÅܼƨS¦³³]©w¨ì .Document.getElementsByTagName("table")

©Ò¥H­nµ¥­Ô¤@¤U,ºô¸ô¸ê®Æ¤U¸ü½T¹ê§¹¦¨
  1. Application.Wait Now + #12:00:01 AM#
  2. Set myItems = .Document.getElementsByTagName("table")
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 6# GBKEE
¹ï¤£°_¨S¯d·N¨ì  With Worksheets("Á{®É¸ê®Æ2")  ªº°ÝÃD¡A
ÁÂÁ«ü¥¿¡C¦P®É±N¼Ó¤W©Ò­z Do Loop ­×»\«á°õ¦æ¡A
¥X²{ "¨S¦³Åv­­"¡H

TOP

Do Until .readyState = READYSTATE_COMPLETE: DoEvents: Loop
    Application.Wait Now + #12:00:01 AM#                  

§â¤W­±¨º¨â¦æ§ï¦¨¤U­±³o¤@¦æ¡A¤ñ¸û¤£·|¦]©µ¿ð¿ù»~²£¥Í¿ù»~
    Do Until .readyState = 4 And Not .Busy: DoEvents: Loop

TOP

¦^´_ 5# c_c_lai
2003°õ¦æ¨S¦³¿ù»~,½Ð«ü¥X¿ù»~ÂI.

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

TOP

¦^´_ 4# GBKEE
ÁÂÁ±z¡I¤£¹L°õ¦æ°_¨Ó¦³¨Ç¿ù»~¡A¦p¹Ï¡G

TOP

¦^´_ 3# c_c_lai

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

TOP

        ÀR«ä¦Û¦b : ¯à·F¤£·F¡A¤£¦p­W·F¹ê·F¡C
ªð¦^¦Cªí ¤W¤@¥DÃD