- ©«¤l
- 8
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 14
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- Office2003
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-8-7
- ³Ì«áµn¿ý
- 2012-10-18
|
¦^´_ 6# c_c_lai
±z¦n~
§Úªº¥u¬O¥Î«Ü²³æªº¸ê®Æ¥h§ì¨ú¤@¨Ç¬ÛÃö¸ê®Æ¥u¦³³]©w¨C¤ÀÄÁ§ì¨úDDEÀx¦s®æªº¸ê®Æ¨Ó°µ¬ö¿ý
±z¬Ý¤@¤U
Option Explicit
Dim LastMin As Integer
Private Sub Workbook_Open()
Sheets("µ¦²¤°O¿ý").Cells(4, 2) = 12
LastMin = Minute(Time)
Call Timer
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
On Error Resume Next
Application.OnTime Now + TimeValue("00:00:01"), "ThisWorkbook.Timer", , False
End Sub
Public Sub Timer()
Dim Pos As Integer, i As Integer, RangeStr As String
On Error Resume Next
Application.OnTime Now + TimeValue("00:00:01"), "ThisWorkbook.Timer" '¨C¬íÅã¥Ü
Sheets("µ¦²¤°O¿ý").Cells(1, 1) = Time '±N®É¶¡show¦Üµ¦²¤ªºa1Äæ¦ì
Dim HHMM As Integer
HHMM = Hour(Time) * 100 + Minute(Time)
If (HHMM < 830 Or HHMM > 1346) Then Exit Sub 'Àç·~®É¶¡¤~°õ¦æ
If Minute(Time) <> LastMin Then '¶}©l«á°µ
With Sheets("µ¦²¤°O¿ý")
.Cells(4, 2) = .Cells(4, 2) + 1 '±NÅܰʦ渹¥[¤@¦æ
Pos = .Cells(4, 2)
.Cells(Pos, 1) = Time
.Cells(Pos, 2) = .Cells(2, 2)
.Cells(Pos, 3) = .Cells(2, 3)
.Cells(Pos, 4) = .Cells(2, 4)
.Cells(Pos, 5) = .Cells(2, 5)
.Cells(Pos, 6) = .Cells(2, 6)
.Cells(Pos, 7) = .Cells(2, 7)
.Cells(Pos, 8) = .Cells(2, 8)
.Cells(Pos, 9) = .Cells(2, 9)
.Cells(Pos, 10) = .Cells(2, 10)
.Cells(Pos, 11) = .Cells(2, 11)
.Cells(Pos, 12) = .Cells(2, 12)
.Cells(Pos, 13) = .Cells(2, 13)
.Cells(Pos, 14) = .Cells(2, 14)
.Cells(Pos, 15) = .Cells(2, 15)
.Cells(Pos, 16) = .Cells(2, 16)
.Cells(Pos, 17) = .Cells(2, 17)
End With
LastMin = Minute(Time)
End If
End Sub
¹³±z¶KªºÀÉ®×,§Ú´N¯uªº¤£ª¾¹DÁÙnקïþÃä,¤~¯à¦Û°Ê¼g¤J¤F,·Ð½Ð±z±Ð¾É¤@¤U(¦]¬°§Ú§¹¥þ¤£À´VBA½s½X........½Ð§O¨£¯º)
¥t¥~·Q¦V±z½Ð±Ð¤@¤U,±z¦³6¤ë¥H«eªº¥x«ü©_¦hªÅ¤O¹Dªº¸ê®Æ¤Î¦¨¥æ»ù£v??
·PÁ±z |
|