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

¸Ó¦p¦ó¨ú®ø¥¨¶°???

¸Ó¦p¦ó¨ú®ø¥¨¶°???

¤U­±¬O²{¦b®É¶¡+´X¬íÄÁ«árun ddd, ½Ð°Ý¥i¥H¦b¤w¸grun abc«á, ¤¤³~°±¤îrun ddd¶Ü??
Sub abc()
Application.OnTime Now + 0.000100, "ddd"
End Sub

Sub ddd()
BEEP
End Sub
ªì¾ÇªÌcolor

¦^´_ 1# color790
¥i¸Ô¬ÝVBA »¡©ú:  OnTime¤èªk
  1. Option Explicit
  2. Dim S As Date
  3. Sub abc()
  4.     S = Now + 0.0001   '®É¶¡
  5.     Application.OnTime S, "ddd"
  6. End Sub
  7. Sub ddd()
  8.     MsgBox "AAA"
  9.     Beep
  10. End Sub
  11. Sub OnTime_Cancel()  'S ®É¶¡¤§«e ¨ú®øµ{¦¡
  12.     Application.OnTime S, "ddd", , False
  13. End Sub
½Æ»s¥N½X

TOP

HI~ª©¥D
ÁÂÁ§Aªº¦^µª, ¤£¦n·N«ä, ªù¥~º~µo°Ý¤@¤U
¬°¤°»ò¤@©w­n³o¤@¥y Option Explicit
¥t¥~,¥[¤W¥h³£·|¦³¿ù»~, ÁÙ¬O½Ð§AÀ°§Ú¬Ý¤@¤U¦n¤F....

Public x As Long, S As Double

Sub start()
Application.OnKey "{RIGHT}", "go"
Application.OnKey "{LEFT}", "STOPS"
Range("r2:t30,d4:d8,g4:g8,k4:k8,n4:n8").ClearContents
End Sub
Sub go()
k = 2: m = 2: n = 2
Do Until Cells(k, 18) = ""
k = k + 1
Loop
Do Until Cells(m, 19) = ""
m = m + 1
Loop
Do Until Cells(n, 20) = ""
n = n + 1
Loop
If x = 0 Or x = 2 Then
Application.OnTime Now + 0.0001, "test3"
End If
If x = 0 Then S = Timer
Select Case x
Case 0
S = Timer
x = x + 1
Case 1
S = Timer
x = x + 1
Case 2
Cells(k, 18) = (Timer - S) / 86400: S = Timer
x = x + 1
Case 3
S = Timer
x = x + 1
Case 4
Cells(m, 19) = (Timer - S) / 86400: S = Timer
x = x + 1
Case 5
Cells(n, 20) = (Timer - S) / 86400: S = Timer
x = 0
ActiveWorkbook.Save
End Select
End Sub

Sub closefuntion()
Application.OnKey "{RIGHT}"
x = 0
End Sub

Sub test3()
BEEP
End Sub


Sub STOPS()
Application.OnTime Now + 0.0001, "test3", , False
End Sub
ªì¾ÇªÌcolor

TOP

¦^´_ 3# color790

¦bµ{¦¡½X³»ºÝ¥[¤JOption Explicit   ÅܼƱj¨î«Å§i
¦b±µ¤U¨ÓªºÅܼƳ£¥²¶·«Å§i¨ä¸ê®Æ«¬ºA
¥u­n¨S¦³«Å§i´N·|¥X¿ù
¥[¤W³o¦æ¦³¤@­Ó¦n³B¡A´N¬O¦pªGÅܼƫ÷¿ù«Ü®e©ö°»¿ù
¦A«h¡AÅܼƽT¹ê«Å§i«¬ºA¡A¹ïµ{¦¡°õ¦æ³t«×¦³«Ü¤jÀ°§U
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ color790 ©ó 2012-2-9 23:48 ½s¿è

ÁÂÁª©¥Dªº¦^µª~
¥t¥~½Ð°Ý....
³o­Óµ{¦¡¦b«ö¥kÁä«á°²³]¶}©l­p®É20¬í, ¦ý¦b²Ä12¬í®É«ö¤F¥ªÁä°±¤î¤FSub STOPS()ªº°õ¦æ
¦A«ö¤@¦¸¥kÁä·Q­n¦A8¬í(20-12=8)«á°õ¦æSub STOPS()¸Ó«ç»ò§ï?(§Î®eªº¤£¤Ó¦n,§Æ±æª©¥D¬ÝªºÀ´)

§Ú¬O§ï¦¨³o¼Ë, ¦ý«ö¤F¥kÁä¦A«ö¥ªÁä,¦A«ö¥kÁä, «o¨Sµo¥XÁn­µ..(­«ÂI¦b¬õ¦r°Ï,z=0 À³¸Ó´N¬O«üz="¤W¤È 12:00:00" §a????)
Option Explicit
Dim p, w, z As Date
Public x As Long, S As Double

Sub start()
Application.OnKey "{RIGHT}", "go"
Application.OnKey "{LEFT}", "STOPS"
End Sub

Sub go()
If x = 0 Or x = 2 Then
If z <> "¤W¤È 12:00:00" Then
w = z - Now
Application.OnTime w, "test3"
Else
p = Now + 0.000112
Application.OnTime p, "test3"
End If
End If

z = 0
End Sub


Sub test3()
BEEP
End Sub


Sub STOPS()
Application.OnTime Now + 0.0001, "test3", , False
x = x - 1
z = p
End Sub
ªì¾ÇªÌcolor

TOP

¦³ÂI²`¶ø¡A¥u¯àÀ°ªº¤W½d¨Ò¤@«h

¤¤Â_µ{§Ç.rar (7.15 KB)

TOP

¦³ÂI²`¶ø¡A¥u¯àÀ°ªº¤W½d¨Ò¤@«h
HUNGCHILIN µoªí©ó 2012-2-9 23:35


«ç»ò¸Ì­±¨S¬Ý¨ìªF¦è??
ªì¾ÇªÌcolor

TOP

¦^´_ 7# color790
°õ¦æ UserForm1 ¬Ý¬Ý

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-2-10 16:40 ½s¿è
¦^´_  color790
°õ¦æ UserForm1 ¬Ý¬Ý
GBKEE µoªí©ó 2012-2-10 08:20

    ???? ÁÙ¬O¨S¦³ªF¦è,¬O°õ¦æ¤ºªº¨º­Ó¿ï¶µ¶Ü?

ªì¾ÇªÌcolor

TOP

¦^´_ 9# color790
­«·s¤U¸ü¬Ý¬Ý

TOP

        ÀR«ä¦Û¦b : §g¤l¬°¥Ø¼Ð¡A¤p¤H¬°¥Øªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD