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

[µo°Ý] ½Ð±Ð¦¹µ{§Ç¬°¦ó¿ù»~?

¥»©«³Ì«á¥Ñ bobomi ©ó 2015-4-5 15:01 ½s¿è

[ ¥¦¬O°õ¦æ¨ì¨º¤@¦æ³Q°±¤îªº??¦p¦ó½T»{¥¦¤w³Q°±¤î¤F?? ]

À³¸Ó¬O­n¶i¤J Sub timestock() ¤§«e,  Application.OnTime ´N¦Û°Ê¦P®É Stop ¤F, °õ¦æ¦b¤º³¡©Ò¥H§A¬Ý¤£¨£

°õ¦æ Sub Test_01
¨BÆJ (2) ¯à¦¨¥\ , ¨BÆJ (3) «o¥¢±Ñ
´N¥i¥Hª¾¹D·í  Application.OnTime Time + 1 / 86400, "AAA", , False '  °õ¦æ ¥¢±Ñ®É(µo¥X Error Msg ®É)
´N¥NªíµÛ  Timer For Sub AAA ¦­¤w¸g°±¤î¤F
¦]¬°¨BÆJ (2) ¤w¸g¦¨¥\°±¤î¤F Timer For Sub AAA
©Ò¥H¨BÆJ (3) §A¦A°±¤î1¦¸´N¥¢±Ñ¤F , ¦¹®É Application.OnTime ¤º³¡¦­´N¨S¦³ Timer For Sub AAA ³o±ø Link , Application.OnTime ¦]¬°§ä¤£¨ì Timer For Sub AAA ¦Óµo¥X Error Msg


Sub Test_01()
On Error GoTo 0: On Error Resume Next
Application.OnTime Time + 1 / 86400, "AAA", , True  '(1)--> °õ¦æ ok
If Err Then MsgBox "err #1"
On Error GoTo 0: On Error Resume Next
Application.OnTime Time + 1 / 86400, "AAA", , False  '(2)--> °õ¦æ ok (Timer For Sub AAA ¤w¸g°±¤î)
If Err Then MsgBox "err #2"
On Error GoTo 0: On Error Resume Next
Application.OnTime Time + 1 / 86400, "AAA", , False '(3)--> °õ¦æ ¥¢±Ñ
If Err Then MsgBox "err #3"
End Sub

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2015-4-5 14:56 ½s¿è
³sÄò¤@ª½¥X²{"­«¶]"??

If Time >  + TIMEB Then
¦]¬°§Aªº  ©ñ¦b module¤U, ¦Ó¥B¨S¦³©ú½T«ü©w  ¨ì©³¬O S ...
bobomi µoªí©ó 2015-4-5 14:39

§Ú¦³«ü©ú°Ú !
¥¦¤£¬O private
With Workbooks("book1.xls").Sheets("sheet1")
.Range("B2") = TimeValue(Now)

TOP

³sÄò¤@ª½¥X²{"­«¶]"??

If Time > [b2] + TIMEB Then
¦]¬°§Aªº [b2] ©ñ¦b module¤U, ¦Ó¥B¨S¦³©ú½T«ü©w [b2] ¨ì©³¬O Sheet1.[b2] ÁÙ¬O Sheet2.[b2],  ÁÙ¬O Sheet3.[b2].....
©Ò¥H EXCEL ¦Û°ÊÀ°§A¨M©w¤F
·í§A¤Á´«¨ìSHEET1 ®É, EXCEL ¦Û°Ê§â [b2] ·í¦¨ Sheet1.[b2]
·í§A¤Á´«¨ìSHEET2 ®É, EXCEL ¦Û°Ê§â [b2] ·í¦¨ Sheet2.[b2] (ªÅ­È)

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2015-4-5 13:15 ½s¿è
Ie.Navigate "http://mis.twse.com.tw/stock/group.jsp?ex=tse&ind=TIDX#STATISTICS"
Åý Ie.Naviga ...
bobomi µoªí©ó 2015-4-5 08:10


Ie.Refresh2  ³o¬Oie ªºÄÝ©Ê ??«á­±¦h¤@­Ó2 ???

  §Aªº  Application.OnTime The_Time, "timestock", Schedule:=False ¤§©Ò¥H·|µo¥X Error Msg
¬O¦]¬°§Aªº  Application.OnTime  ¦­´N¤w¸g¦Û°Ê³Q°±¤î¤F

¥¦¬O°õ¦æ¨ì¨º¤@¦æ³Q°±¤îªº??¦p¦ó½T»{¥¦¤w³Q°±¤î¤F??
---------------------------------------------------
¥t¥~½Ð±Ð¥t¤@­Ó°ÝÃDªþÀÉ Book1.zip (10.03 KB)
¦¹¨Ò Schedule:=False ¤]¬O¿ù»~¡A¤£¹L­n½Ð±Ð¥t¤@­Ó°ÝÃD
°õ¦æIE345678 «á¡A¤j¬ù17¬í·|­«·s¶](­ì¥»³]­p³o¬O¥¿±`)¡A¦ý°õ¦æ¤¤¡A¬°¦ó¤Á´«¨ìSHEET2®É·|³sÄò¤@ª½¥X²{"­«¶]"??
B2 ªº­È·í¤Á´«¨ìSHEET2 ´N§ì¤£¨ì ???(µ{§Ç¤¤¦³«ü©w¤u§@ªí)

TOP

5¬íºô¯¸·|¦Û°Ê§ó·s¤@¦¸¸ê®Æ¡A§Úµo²{ie °±¯d10¤À·|³y¦¨excel¾ã­Ó³t«×ºC¤U¨Ó(·Æ¹«¥X²{º|¤æª¬)¡A©Ò¥H¥²¶·¸õ¥XIE, ¦A­«¶]
t8899 µoªí©ó 2015-4-5 06:22



Ie.Navigate "http://mis.twse.com.tw/stock/group.jsp?ex=tse&ind=TIDX#STATISTICS"
Åý Ie.Navigate ¥u°õ¦æ1¦¸ ,  Ie.Navigate ¤£­n¥X²{¦b sub timestock  , ¦Ó¥B«O«ù IE ¥Ã»·¤£³QÃö³¬

±µ¤U¨Ó¥Î Application.Otime  ....  

Sub   timestock()

    Call Ie.Refresh2  '¥Î Ie.Refresh2  ¨ú¥N±¼ Ie.Navigate
    Do Until Ie.readyState = 4
    DoEvents
    Loop

    my = #12:00:01 AM#
    The_Time = Time + my
    Application.OnTime The_Time, "timestock"

End  Sub

TOP

Schedule:=False  ÁÙ¬O¨S¿ìªk²×¤î?
¤§«e¦b§Oªºµ{§Ç¤¤¤]¸g±`µo¥Í.......§ï¦¨¤½¥ÎÅܼƴN¥i¥H°±¤î,,³o¦¸´N¤£¦æ¤F
t8899 µoªí©ó 2015-4-4 22:30


§Aªº  Application.OnTime The_Time, "timestock", Schedule:=False ¤§©Ò¥H·|µo¥X Error Msg
¬O¦]¬°§Aªº  Application.OnTime  ¦­´N¤w¸g¦Û°Ê³Q°±¤î¤F
©Ò¥H§A¦A¦¸¹ï¥¦¤U¹F°±¤îªº©R¥O®É, ¥¦´N·|µo¥X Error Msg
¦]¬° Application.OnTime ¦^©I¶i¤J°õ¦æ "timestock" ®É , EXCEL ´N¦Û°Ê§â¥¦°±¤î¤F


'=========
[a2] = [a2] + 1   
Range("a1").Value = Format(The_Time, "hh:mm:ss")



my = #12:00:01 AM#
The_Time = Time + my
Application.OnTime The_Time, "timestock"    ' ---> §â³o­Ó©ñ¨ì sub timestock ªº³Ì«á­±¨Ó¬Ý¬Ý¯à¤£¯à¸Ñ¨M

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2015-4-5 06:23 ½s¿è
(1) ¬°¦ó­n¶]¤@¬q®É¶¡«á¸õ¥X©O
¬O¦]¬°§Aªº Sub timestock() ÁÙ¨S­pºâ§¹®É,  Sub timestock() «o¤S²ö¦W­«·s ...
bobomi µoªí©ó 2015-4-4 23:10


¤W­±¬O­Ó´ú¸Õ
§Ú¬O¥Îie³s¤W¬Yºô¯¸
Set Ie = CreateObject("InternetExplorer.Application")
Ie.Navigate "http://mis.twse.com.tw/stock/group.jsp?ex=tse&ind=TIDX#STATISTICS"
5¬íºô¯¸·|¦Û°Ê§ó·s¤@¦¸¸ê®Æ¡A§Úµo²{ie °±¯d10¤À·|³y¦¨excel¾ã­Ó³t«×ºC¤U¨Ó(·Æ¹«¥X²{º|¤æª¬)¡A©Ò¥H¥²¶·¸õ¥XIE, ¦A­«¶]

>>>>[a2] = [a2] + 1    ------------>    §A³o¸Ìªº¯u¥¿­ì©l Code ¬O§_¬O¤@¬q«Ü¯Ó®Éªº­pºâ, ·|ªáÆZ¤[ªº­pºâ   ?????
§Ú§â³o¦æ®³±¼¤]¨S¥Î

TOP

¥»©«³Ì«á¥Ñ bobomi ©ó 2015-4-4 23:15 ½s¿è

(1) ¬°¦ó­n¶]¤@¬q®É¶¡«á¸õ¥X©O
¬O¦]¬°§Aªº Sub timestock() ÁÙ¨S­pºâ§¹®É,  Sub timestock() «o¤S²ö¦W­«·s­pºâ¤@¦¸¶Ü ?



(2)

    my = #12:00:01 AM#
The_Time = Time + my
Application.OnTime The_Time, "timestock"

[a2] = [a2] + 1    ------------>    §A³o¸Ìªº¯u¥¿­ì©l Code ¬O§_¬O¤@¬q«Ü¯Ó®Éªº­pºâ, ·|ªáÆZ¤[ªº­pºâ   ??????  
Range("a1").Value = Format(The_Time, "hh:mm:ss")

TOP

³Ì²³æªº¤èªk´N¬O "³q³q" ¤£¥Î«ü©w Schedule:=False  ´N¤£·|¦³³o­Ó°ÝÃD¤F
If AG > TIMEB Then
  Applicat ...
bobomi µoªí©ó 2015-4-4 21:41


Schedule:=False  ÁÙ¬O¨S¿ìªk²×¤î?
¤§«e¦b§Oªºµ{§Ç¤¤¤]¸g±`µo¥Í.......§ï¦¨¤½¥ÎÅܼƴN¥i¥H°±¤î,,³o¦¸´N¤£¦æ¤F
§Úªº»Ý¨D¬O¶]¤@¬q®É¶¡«á¸õ¥X¦A­«¶]¡A©Ò¥HSchedule:=False ¤@©w­n½T»{°h¥X¤~¦æ

TOP

¥»©«³Ì«á¥Ñ bobomi ©ó 2015-4-4 21:43 ½s¿è

³Ì²³æªº¤èªk´N¬O "³q³q" ¤£¥Î«ü©w Schedule:=False  ´N¤£·|¦³³o­Ó°ÝÃD¤F
If AG > TIMEB Then
  Application.OnTime The_Time, "timestock"
      The_Time = 0
       Range("B2") = TimeValue(Now)
    MsgBox "­«¶]"
timestock
Exit Sub
End If

TOP

        ÀR«ä¦Û¦b : µÊ®ð¼L¤Ú¤£¦n¡A¤ß¦a¦A¦n¤]¤£¯àºâ¬O¦n¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD