- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 254
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-23
|
¥»©«³Ì«á¥Ñ Hsieh ©ó 2012-2-12 00:42 ½s¿è
¦^´_ 5# color790
§Aªº·N«ä¤£ª¾¬O§_¦p¦¹?
ª`·Nµ{§Ç¦WºÙ¤£¯à¨Ï¥ÎVBA«O¯d¦r- Public x As Long, S As Double, t As Date, yn As Boolean
- Sub start()
- Application.OnKey "{RIGHT}", "gomysub"
- Application.OnKey "{LEFT}", "STOPS"
- Range("r2:t30,d4:d8,g4:g8,k4:k8,n4:n8").ClearContents
- End Sub
- Sub gomysub()
- 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
- t = Now + 0.0001
- Application.OnTime t, "test3"
- yn = True
- 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
- MsgBox t & "®É¶¡¨ì"
- yn = False
- End Sub
- Sub STOPS()
- If yn = True Then Application.OnTime t, "test3", , False: MsgBox "test3¤w¸g°±¤î" Else MsgBox t & "¤w¸g¹B¦æ"
- End Sub
½Æ»s¥N½X |
|